Two-stage control systems and methods for economical optimization of an electrical system

ABSTRACT

The present disclosure is directed to systems and methods for economically optimal control of an electrical system. Some embodiments employ generalized multivariable constrained continuous optimization techniques to determine an optimal control sequence over a future time domain in the presence of any number of costs, savings opportunities (value streams), and constraints. Some embodiments also include control methods that enable infrequent recalculation of the optimal setpoints. Some embodiments may include a battery degradation model that, working in conjunction with the economic optimizer, enables the most economical use of any type of battery. Some embodiments include techniques for load and generation learning and prediction. Some embodiments include consideration of external data, such as weather.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/414,551, filed Jan. 24, 2017, titled “Two-Stage Control Systems andMethods for Economical Optimization of an Electrical System,” whichclaims priority to U.S. Provisional Patent Application No. 62/317,372,titled “Economically Optimal Control of Electrical Systems,” filed Apr.1, 2016, and claims priority to U.S. Provisional Patent Application No.62/328,476, titled “Demand Charge Reduction using Simulation-BasedDemand Setpoint Determination,” filed Apr. 27, 2016. The subject matterof each of the foregoing applications is hereby incorporated herein byreference to the extent such subject matter is not inconsistentherewith.

TECHNICAL FIELD

The present disclosure is directed to systems and methods for control ofan electrical system, and more particularly to controllers and methodsof controllers for controlling an electrical system.

BACKGROUND

Electricity supply and delivery costs continue to rise, especially inremote or congested areas. Moreover, load centers (e.g., populationcenters where electricity is consumed) increasingly demand moreelectricity. In the U.S. energy infrastructure is such that power ismostly produced by resources inland, and consumption of power isincreasing at load centers along the coasts. Thus, transmission anddistribution (T&D) systems are needed to move the power from where it'sgenerated to where it's consumed at the load centers. As the loadcenters demand more electricity, additional T&D systems are needed,particularly to satisfy peak demand. However, a major reasonconstruction of additional T&D systems is unwise and/or undesirable isbecause full utilization of this infrastructure is really only necessaryduring relatively few peak demand periods, and would otherwise beunutilized or underutilized. Justifying the significant costs ofconstructing additional T&D resources may make little sense when actualutilization may be relatively infrequent.

Distributed energy storage is increasingly seen as a viable means forminimizing rising costs by storing electricity at the load centers foruse during the peak demand times. An energy storage system (ESS) canenable a consumer of energy to reduce or otherwise control a netconsumption from an energy supplier. For example, if electricity supplyand/or delivery costs are high at a particular time of day, an ESS,which may include one or more batteries or other storage devices, cangenerate/discharge electrical energy at that time when costs are high inorder to reduce the net consumption from the supplier. Likewise, whenelectricity rates are low, the ESS may charge so as to have reserveenergy to be utilized in a later scenario as above when supply and/ordelivery costs are high.

Presently available automatic controllers of electrical systems utilizerule sets and iteration to find an operating command that in itssimplest form can be a single scalar value that specifies the charge (ordischarge) power setting of a battery. The main drawbacks of thisexisting approach are that it doesn't necessarily provide economicallyoptimal control considering all costs and benefits, rule sets becomecomplex quickly, even for just two value streams (which makes thealgorithm difficult to build and maintain), and this approach is noteasily scalable to new rate tariffs or other markets or value streams(rule sets must be rewritten).

An economically optimizing automatic controller may be beneficial andmay be desirable to enable intelligent actions to be taken to moreeffectively utilize controllable components of an electrical system, andwithout the aforementioned drawbacks.

BRIEF DESCRIPTION OF THE DRAWINGS

Additional aspects and advantages will be apparent from the followingdetailed description of preferred embodiments, which proceeds withreference to the accompanying drawings, in which:

FIG. 1 is a block diagram illustrating a system architecture of acontrollable electrical system, according to one embodiment of thepresent disclosure.

FIG. 2 is a flow diagram of a method or process of controlling anelectrical system, according to one embodiment of the presentdisclosure.

FIG. 3 is a graph illustrating an example of nonlinear continuousoptimization to determine a minimum or maximum of an equation givenspecific constraints.

FIG. 4 is a contour plot illustrating an example of nonlinear continuousoptimization of FIG. 3 to determine a minimum or maximum of an equationgiven specific constraints.

FIG. 5 is a block diagram illustrating a system architecture of acontrollable electrical system, according to one embodiment of thepresent disclosure.

FIG. 6 is a flow diagram of a method or process of controlling anelectrical system, according to one embodiment of the presentdisclosure.

FIG. 7 is a flow diagram of a method of predicting load and/orgeneration of an electrical system during an upcoming time domain,according to one embodiment of the present disclosure.

FIG. 8 is a graphical representation 800 of predicting load and/orgeneration of an electrical system during an upcoming time domain.

FIG. 9 is a graph illustrating one example of segmenting an upcomingtime domain into multiple time segments.

FIG. 10 is a diagrammatic representation of a cost function evaluationmodule, according to one embodiment of the present disclosure.

FIG. 11 is a flow diagram of a method of preparing a cost functionƒ_(c)(X), according to one embodiment of the present disclosure.

FIG. 12 is a flow diagram of a method of evaluating a cost function thatis received from an external source or otherwise unprepared, accordingto one embodiment of the present disclosure.

FIG. 13 is a flow diagram of a method of evaluating a prepared costfunction, according to one embodiment of the present disclosure.

FIG. 14 is a diagrammatic representation of an optimizer that utilizesan optimization algorithm to determine an optimal control parameter set.

FIG. 15 is a graph illustrating an example result from an economicoptimizer (EO) for a battery ESS.

FIG. 16 is a method of a dynamic manager, according to one embodiment ofthe present disclosure.

FIG. 17 is a graph showing plots for an example of application of aparticular four-parameter control set during a time segment.

FIG. 18 is a graph providing a plot of the wear rate vs. state of chargefor a specific battery degradation model, according to one embodiment ofthe present disclosure.

FIG. 19 is a graph providing a plot showing a relationship between stateof charge and aging rate (or an aging factor) for a specific batterydegradation model, according to one embodiment of the presentdisclosure.

FIG. 20 is a pair of graphs that illustrate a battery's lifetime.

FIG. 21 is a diagram of an economic optimizer, according to oneembodiment of the present disclosure.

FIG. 22 is a diagram of a dynamic manager, according to one embodimentof the present disclosure.

FIG. 23 is a graph illustrating how Time-of-Use (ToU) supply chargesimpact energy costs of a customer.

FIG. 24 is a graph illustrating how demand charges impact energy costsof a customer.

FIG. 25 is a graph illustrating the challenge of maximizing a customer'seconomic returns for a wide range of system configurations, buildingload profiles, and changing utility tariffs.

DETAILED DESCRIPTION

As electricity supply and delivery costs increase, especially in remoteor congested areas, distributed energy storage is increasingly seen as aviable means for reducing those costs. The reasons are numerous, butprimarily an energy storage system (ESS) gives a local generator orconsumer the ability to control net consumption and delivery ofelectrical energy at a point of interconnection, such as a building'sservice entrance in example implementations where an ESS is utilized inan apartment building or office building. For example, if electricitysupply and/or delivery costs (e.g., charges) are high at a particulartime of day, an ESS can generate/discharge electrical energy from astorage system at that time to reduce the net consumption of a consumer(e.g., a building), and thus reduce costs to the consumer. Likewise,when electricity rates are low, the ESS may charge its storage systemwhich may include one or more batteries or other storage devices; thelower-cost energy stored in the ESS can then be used to reduce netconsumption and thus costs to the consumer at times when the supplyand/or delivery costs are high. There are many ways an ESS can providevalue.

One possible way in which ESSs can provide value (e.g., one or morevalue streams) is by reducing time-of-use (ToU) supply charges. ToUsupply charges are typically pre-defined in a utility's tariff documentby one or more supply rates and associated time windows. ToU supplycharges may be calculated as the supply rate multiplied by the totalenergy consumed during the time window. ToU supply rates in the UnitedStates may be expressed in dollars per kilowatt-hour ($/kWh). The ToUsupply rates and time windows may change from time to time, for exampleseasonally, monthly, daily, or hourly. Also, multiple ToU supply ratesand associated time windows may exist and may overlap. ToU supply ratesare time-varying which makes them different from “flat” supply ratesthat are constant regardless of time of use. An example of ToU chargesand the impact on customer energy costs is illustrated in FIG. 24 anddescribed more fully below with reference to the same. An automaticcontroller may be beneficial and may be desirable to enable intelligentactions to be taken as frequently as may be needed to utilize an ESS toreduce ToU supply charges.

Another possible way in which ESSs can provide value is by reducingdemand charges. Demand charges are electric utility charges that arebased on the rate of electrical energy consumption (also called“demand”) during particular time windows (which we will call “demandwindows”). A precise definition of demand and the formula for demandcharges may be defined in a utility's tariff document. For example, atariff may specify that demand be calculated at given demand intervals(e.g., 15-minute intervals, 30-minute intervals, 40-minute intervals,60-minute intervals, 120-minute intervals, etc.). The tariff may alsodefine demand as being the average rate of electrical energy consumptionover a previous period of time (e.g., the previous 15 minutes, 30minutes, 40 minutes, etc.). The previous period of time may or may notcoincide with the demand interval. Demand may be expressed in units ofpower such as kilowatts (kW) or megawatts (MW). The tariff may describeone or more demand rates, each with an associated demand window (e.g., aperiod of time during which a demand rate applies). The demand windowsmay be contiguous or noncontiguous and may span days, months, or anyother total time interval per the tariff. Also, one or more demandwindow may overlap which means that, at a given time, more than onedemand rate may be applicable. Demand charges for each demand window maybe calculated as a demand rate multiplied by the maximum demand duringthe associated demand window. Demand rates in the United States may beexpressed in dollars per peak demand ($/kW). An example of demandcharges is shown in FIG. 24 and described more fully below withreference to the same. As can be appreciated, demand tariffs may changefrom time to time, or otherwise vary, for example annually, seasonally,monthly, or daily. An automatic controller may be beneficial and may bedesirable to enable intelligent actions to be taken as frequently as maybe needed to utilize an ESS to reduce demand charges.

Another possible way in which ESSs can provide value is throughimproving utilization of local generation by: (a) maximizingself-consumption of renewable energy, or (b) reducing fluctuations of arenewable generator such as during cloud passage on solar photovoltaic(PV) arrays. An automatic controller may be beneficial and may bedesirable to enable intelligent actions to be taken to effectively andmore efficiently utilize locally generated power with an ESS.

Another possible way in which ESSs can provide value is throughleveraging local contracted or incentive maneuvers. For example, NewYork presently has available a Demand Management Program (DMP) and aDemand Response Program (DRP). These programs, and similar programs,offer benefits (e.g., a statement credit) or other incentives forconsumers to cooperate with the local utility(ies). An automaticcontroller may be beneficial and may be desirable to enable intelligentactions to be taken to utilize an ESS to effectively leverage thesecontracted or incentive maneuvers.

Still another possible way in which ESSs can provide value is throughproviding reserve battery capacity for backup power in case of loss ofsupply. An automatic controller may be beneficial and may be desirableto enable intelligent actions to be taken to build and maintain suchreserve battery backup power with an ESS.

As can be appreciated, an automatic controller that can automaticallyoperate an electrical system to take advantage of any one or more ofthese value streams using an ESS may be desirable and beneficial.

Controlling Electrical Systems

An electrical system, according to some embodiments, may include one ormore electrical loads, generators, and ESSs. An electrical system mayinclude all three of these components (loads, generators, ESSs), or mayhave varying numbers and combinations of these components. For example,an electrical system may have loads and an ESS, but no local generators(e.g., photovoltaic, wind). The electrical system may or may not beconnected to an electrical utility distribution system (or “grid”). Ifnot connected to an electrical utility distribution system, it may betermed “off-grid.”

An ESS of an electrical system may include one or more storage devicesand any number of power conversion devices. The power conversion devicesare able to transfer energy between an energy storage device and themain electrical power connections that in turn connect to the electricalsystem loads and, in some embodiments, to the grid. The energy storagedevices may be different in different implementations of the ESS. Abattery is a familiar example of a chemical energy storage device. Forexample, in one embodiment of the present disclosure, one or moreelectric vehicle batteries is connected to an electrical system and canbe used to store energy for later use by the electrical system. Aflywheel is an example of a mechanical energy storage device.

FIG. 1 is a control diagram of an electrical system 100, according toone embodiment of the present disclosure. Stated otherwise, FIG. 1 is arepresentative diagram of a system architecture of an electrical system100 including a controller 110, according to one embodiment. Theelectrical system 100 comprises a building electrical system 102 that iscontrolled by the controller 110. The building electrical system 102includes one or more loads 122, one or more generators 124, and anenergy storage system (ESS) 126. The building electrical system 102 iscoupled to an electrical utility distribution system 150, and thereforemay be considered on-grid. Similar electrical systems exist for otherapplications such as a photovoltaic generator plant and an off-gridbuilding.

In the control diagram of FIG. 1, the controller 110 is shown on theleft-hand side and the building electrical system 102, sometimes calledthe “plant,” is on the right-hand side. The controller 110 may includeelectronic hardware and software in one embodiment. In one examplearrangement, the controller 110 includes one or more processors andsuitable storage media, which stores programming in the form ofexecutable instructions which are executed by the processors toimplement the control processes. In some embodiments, the buildingelectrical system 102 is the combination of all local loads 122, localgenerators 124, and the ESS 126.

Loads are consumers of electrical energy within an electrical system.Examples of loads are air conditioning systems, motors, electricheaters, etc. The sum of the loads' electricity consumption rates can bemeasured in units of power (e.g. kW) and simply called “load” (e.g., abuilding load).

Generators may be devices, apparatuses, or other means for generatingelectrical energy within an electrical system. Examples are solarphotovoltaic systems, wind generators, combined heat and power (CHP)systems, and diesel generators or “gen-sets.” The sum of electric energygeneration rates of the generators 124 can be measured in units of power(e.g., kW) and simply referred to as “generation.”

As can be appreciated, loads may also generate at certain times. Anexample may be an elevator system that is capable of regenerativeoperation when the carriage travels down.

Unadjusted net power may refer herein to load minus generation in theabsence of active control by a controller described herein. For example,if at a given moment a building has loads consuming 100 kW, and a solarphotovoltaic system generating at 25 kW, the unadjusted net power is 75kW. Similarly, if at a given moment a building has loads consuming 70kW, and a solar photovoltaic system generating at 100 kW, the unadjustednet power is −30 kW. As a result, the unadjusted net power is positivewhen the load energy consumption exceeds generation, and negative whenthe generation exceeds the load energy consumption.

ESS power refers herein to a sum of a rate of electric energyconsumption of an ESS. If ESS power is positive, an ESS is charging(consuming energy). If ESS power is negative, an ESS is generating(delivering energy).

Adjusted net power refers herein to unadjusted net power plus the powercontribution of any controllable elements such as an ESS. Adjusted netpower is therefore the net rate of consumption of electrical energy ofthe electrical system considering all loads, generators, and ESSs in thesystem, as controlled by a controller described herein.

Unadjusted demand is demand defined by the locally applicable tariff,but only based on the unadjusted net power. In other words, unadjusteddemand does not consider the contribution of any ESS.

Adjusted demand or simply “demand” is demand as defined by the locallyapplicable tariff, based on the adjusted net power, which includes thecontribution from any and all controllable elements such as ESSs.Adjusted demand is the demand that can be monitored by the utility andused in the demand charge calculation.

Referring again to FIG. 1, the building electrical system 102 mayprovide information to the controller 110, such as in a form ofproviding process variables. The process variables may provideinformation, or feedback, as to a status of the building electricalsystem 102 and/or one or more components (e.g., loads, generators, ESSs)therein. For example, the process variable may provide one or moremeasurements of a state of the electrical system. The controller 110receives the process variables for determining values for controlvariables to be communicated to the building electrical system 102 toeffectuate a change to the building electrical system 102 toward meetinga controller objective for the building electrical system 102. Forexample, the controller 110 may provide a control variable to adjust theload 122, to increase or decrease generation by the generator 124, andto utilize (e.g., charge or discharge) the ESS 126. The controller 110may also receive a configuration (e.g., a set of configurationelements), which may specify one or more constraints of the electricalsystem 102. The controller 110 may also receive external inputs (e.g.,weather reports, changing tariffs, fuel costs, event data), which mayinform the determination of the values of the control variables. A setof external inputs may be received by the controller 110. The set ofexternal inputs may provide indication of one or more conditions thatare external to the controller and the electrical system.

As noted, the controller 110 may attempt to meet certain objectives bychanging a value associated with one or more control variables, ifnecessary. The objectives may be predefined, and may also be dependenton time, on any external inputs, on any process variables that areobtained from the building electrical system 102, and/or on the controlvariables themselves. Some examples of controller objectives fordifferent applications are:

-   -   Minimize demand (kW) over a prescribed time interval;    -   Minimize demand charges ($) over a prescribed time interval;    -   Minimize total electricity charges ($) from the grid;    -   Reduce demand (kW) from the grid by a prescribed amount during a        prescribed time window; and    -   Maximize the life of the energy storage device.

Objectives can also be compound—that is, a controller objective can becomprised of multiple individual objectives. One example of a compoundobjective is to minimize demand charges while maximizing the life of theenergy storage device. Other compound objectives including differentcombinations of the individual objectives are possible.

The inputs that the controller 110 may use to determine (or otherwiseinform a determination of) the control variables can includeconfiguration, external inputs, and process variables.

Process variables are typically measurements of the electrical systemstate and are used by the controller 110 to, among other things,determine how well its objectives are being met. These process variablesmay be read and used by the controller 110 to generate new controlvariable values. The rate at which process variables are read and usedby the controller 110 depends upon the application but typically rangesfrom once per millisecond to once per hour. For battery energy storagesystem applications, the rate is often between 10 times per second andonce per 15 minutes. Examples of process variables may include:

-   -   Unadjusted net power    -   Unadjusted demand    -   Adjusted net power    -   Demand    -   Load (e.g., load energy consumption for one or more loads)    -   Generation for one or more loads    -   Actual ESS charge or generation rate for one or more ESS    -   Frequency    -   Energy storage device state of charge (SoC) (%) for one or more        ESS    -   Energy storage device temperature (deg. C.) for one or more ESS    -   Electrical meter outputs such as kilowatt-hours (kWh) or demand.

A configuration received by the controller 110 (or input to thecontroller 110) may include or be received as one or more configurationelements (e.g., a set of configuration elements). The configurationelements may specify one or more constraints associated with operationof the electrical system. The configuration elements may define one ormore cost elements associated with operation of the electrical system102. Each configuration element may set a status, state, constant orother aspect of the operation of the electrical system 102. Theconfiguration elements may be values that are typically constant duringthe operation of the controller 110 and the electrical system 102 at aparticular location. The configuration elements may specify one or moreconstraints of the electrical system and/or specify one or more costelements associated with operation of the electrical system.

Examples of configuration elements may include:

-   -   ESS type (for example if a battery: chemistry, manufacturer, and        cell model)    -   ESS configuration (for example, if a battery: number of cells in        series and parallel) and constraints (such as maximum charge and        discharge powers)    -   ESS efficiency properties    -   ESS degradation properties (as a function of SoC, discharge or        charge rate, and time)    -   Electricity supply tariff (including ToU supply rates and        associated time windows)    -   Electricity demand tariff (including demand rates and associated        time windows)    -   Electrical system constraints such as minimum power import    -   ESS constraints such as SoC limits or power limits    -   Historic data such as unadjusted net power or unadjusted demand,        weather data, and occupancy    -   Operational constraints such as a requirement for an ESS to have        a specified minimum amount of energy at a specified time of day.

External inputs are variables that may be used by the controller 110 andthat may change during operation of the controller 110. Examples areweather forecasts (e.g., irradiance for solar generation and wind speedsfor wind generation) and event data (e.g., occupancy predictions). Insome embodiments, tariffs (e.g., demand rates defined therein) maychange during the operation of the controller 110, and may therefore betreated as an external input.

The outputs of the controller 110 are the control variables that canaffect the electrical system behavior. Examples of control variablesare:

-   -   ESS power command (kW or %). For example, an ESS power command        of 50 kW would command the ESS to charge at a rate of 50 kW, and        an ESS power command of −20 kW would command the ESS to        discharge at a rate of 20 kW.    -   Building or subsystem net power increase or reduction (kW or %)    -   Renewable energy increase or curtailment (kW or %). For example,        a photovoltaic (PV) system curtailment command of −100 kW would        command a PV system to limit generation to no less than −100 kW.        Again, the negative sign is indicative of the fact that that the        value is generative (non-consumptive).        In some embodiments, control variables that represent power        levels may be signed, e.g., positive for consumptive or negative        for generative.

In one illustrative example, consider that an objective of thecontroller 110 may be to reduce demand charges while preserving batterylife. In this example, only the ESS may be controlled. To accomplishthis objective, the controller should have knowledge of a configurationof the electrical system 102, such as the demand rates and associatedtime windows, the battery capacity, the battery type and arrangement,etc. Other external inputs may also be used to help the controller 110meet its objectives, such as a forecast of upcoming load and/or forecastof upcoming weather (e.g., temperature, expected solar irradiance,wind). Process variables from the electrical system 102 that may be usedmay provide information concerning a net electrical system power orenergy consumption, demand, a battery SoC, an unadjusted building load,and an actual battery charge or discharge power. In this oneillustrative example, the control variable may be a commanded batteryESS's charge or discharge power. In order to more effectively meet theobjective, the controller 110 may continuously track the peak netbuilding demand (kW) over each applicable time window, and use thebattery to charge or generate at appropriate times to limit the demandcharges. In one specific example scenario, the ESS may be utilized toattempt to achieve substantially flat (or constant) demand from theelectrical utility distribution system 150 (e.g., the grid) during anapplicable time window when a demand charge applies.

FIG. 2 is a flow diagram of a method 200 or process of controlling anelectrical system, according to one embodiment of the presentdisclosure. The method 200 may be implemented by a controller of anelectrical system, such as the controller 110 of FIG. 1 controlling thebuilding electrical system 102 of FIG. 1. The controller may read 202 orotherwise receive a configuration (e.g., a set of configurationelements) of the electrical system.

The controller may also read 204 or otherwise receive external inputs,such as weather reports (e.g., temperature, solar irradiance, windspeed), changing tariffs, event data (e.g., occupancy prediction,sizeable gathering of people at a location or venue), and the like.

The controller may also read 206 or otherwise receive process variables,which may be measurements of a state of the electrical system andindicate, among other things, how well objectives of the controller arebeing met. The process variables provide feedback to the controller aspart of a feedback loop.

Using the configuration, the external inputs, and/or the processvariables, the controller determines 208 new control variables toimprove achievement of objectives of the controller. Stated differently,the controller determines 208 new values for each control variable toeffectuate a change to the electrical system toward meeting one or morecontroller objectives for the electrical system. Once determined, thecontrol variables (or values thereof) are transmitted 210 to theelectrical system or components of the electrical system. Thetransmission 210 of the control variables to the electrical systemallows the electrical system to process the control variables todetermine how to adjust and change state, which thereby can effectuatethe objective(s) of the controller for the electrical system.

Optimization

In some embodiments, the controller uses an algorithm (e.g., anoptimization algorithm) to determine the control variables, for example,to improve performance of the electrical system. Optimization can be aprocess of finding a variable or variables at which a function ƒ(x) isminimized or maximized. An optimization may be made with reference tosuch global extrema (e.g., global maximums and/or minimums), or evenlocal extrema (e.g., local maximums and/or minimums). Given that analgorithm that finds a minimum of a function can generally also find amaximum of the same function by negating it, this disclosure willsometimes use the terms “minimization,” “maximization,” and“optimization,” interchangeably.

An objective of optimization may be economic optimization, ordetermining economically optimal control variables to effectuate one ormore changes to the electrical system to achieve economic efficiency(e.g., to operate the electrical system at as low a cost as may bepossible, given the circumstances). As can be appreciated, otherobjectives may be possible as well (e.g., prolong equipment life, systemreliability, system availability, fuel consumption, etc.).

The present disclosure includes embodiments of controllers that optimizea single parameterized cost function (or objective function) foreffectively utilizing controllable components of an electrical system inan economically optimized manner. Various forms of optimization may beutilized to economically optimize an electrical system.

Continuous Optimization

A controller according to some embodiments of the present disclosure mayuse continuous optimization to determine the control variables. Morespecifically, the controller may utilize a continuous optimizationalgorithm, for example, to find economically optimal control variablesto effectuate one or more changes to the electrical system to achieveeconomic efficiency (e.g., to operate the electrical system at as low acost as may be possible, given the circumstances). The controller, inone embodiment, may operate on a single objective: optimize overallsystem economics. Since this approach has only one objective, there canbe no conflict between objectives. And by specifying system economicsappropriately in the cost function (or objective function), allobjectives and value streams can be considered simultaneously based ontheir relative impact on a single value metric. The cost function may becontinuous in its independent variables x, and optimization can beexecuted with a continuous optimization algorithm that is effective forcontinuous functions. Continuous optimization differs from discreteoptimization, which involves finding the optimum value from a finite setof possible values or from a finite set of functions.

As can be appreciated, in another embodiment, the cost function may bediscontinuous in x (e.g., discrete or finite) or piecewise continuous inx, and optimization can be executed with an optimization algorithm thatis effective for discontinuous or piecewise continuous functions.

Constrained Optimization

In some embodiments, the controller utilizes a constrained optimizationto determine the control variables. In certain embodiments, thecontroller may utilize a constrained continuous optimization to find avariable or variables x_(opt) at which a continuous function ƒ(x) isminimized or maximized subject to constraints on the allowable x.

FIGS. 3 and 4 show a graph 300 and a contour plot 400 illustrating anexample of a constrained continuous optimization to determine a minimumor maximum of an equation given specific constraints. Possibleconstraints may be an equation or inequality. FIGS. 3 and 4 consider anequation:ƒ(x)=100(x ₂ −x ₁₂)²+(1−x ₁)².The set x includes the independent variables x₁, x₂. Constraints aredefined by the equation:x ₂ ² +x ₁ ²≤1.

FIG. 3 illustrates a curve 301 of ln (1+ƒ(x)) vs. x₁ and x₂ andillustrates the constraint within an outlined unit disk 303. A minimum305 is at (0.7864, 0.6177).

FIG. 4 illustrates a contour plot 401 of log₁₀(ƒ(x)), which also showsthe constraints within the outlined unit disk 403 and a minimum 405 isat (0.7864, 0.6177).

Constrained continuous optimization algorithms are useful in many areasof science and engineering to find a “best” or “optimal” set of valuesthat affect a governing of a process. They are particularly useful incases where a single metric is to be optimized, but the relationshipbetween that metric and the independent (x) variables is so complex thata “best” set of x values cannot easily be found symbolically in closedform. For example, consider a malignant tumor whose growth rate overtime is dependent upon pH and on the concentration of a particular drugduring various phases of growth. The equation describing growth rate asa function of the pH and drug concentration is known and can be writtendown but may be complex and nonlinear. It might be very difficult orimpossible to solve the equation in closed form for the best pH and drugconcentration at various stages of growth. It may also depend onexternal factors such as temperature. To solve this problem, pH and drugconcentration at each stage of growth can be combined into an x vectorwith two elements. Since the drug concentration and pH may havepractical limits, constraints on x can be defined. Then the function canbe minimized using constrained continuous optimization. The resulting xwhere the growth rate is minimized contains the “best” pH and drugconcentration to minimize growth rate. Note this approach can find theoptimum pH and drug concentration (to machine precision) from acontinuum of infinite possibilities of pH and drug concentration, notjust from a predefined finite set of possibilities.

Generalized Optimization

A controller according to some embodiments of the present disclosure mayuse generalized optimization to determine the control variables. Morespecifically, the controller may utilize a generalized optimizationalgorithm, for example, to find economically optimal control variablesto effectuate one or more changes to the electrical system to achieveeconomic efficiency (e.g., to operate the electrical system at as low acost as may be possible, given the circumstances).

An algorithm that can perform optimization for an arbitrary or generalreal function ƒ(x) of any form may be called a generalized optimizationalgorithm. An algorithm that can perform optimization for a generalcontinuous real function ƒ(x) of a wide range of possible forms may becalled a generalized continuous optimization algorithm. Some generalizedoptimization algorithms may be able to find optimums for functions thatmay not be continuous everywhere, or may not be differentiableeverywhere. Some generalized optimization algorithms are available aspre-written software in many languages including Java®, C++, andMATLAB®. They often use established and well-documented iterativeapproaches to find a function's minimum.

As can be appreciated, a generalized optimization algorithm may alsoaccount for constraints, and therefore be a generalized constrainedoptimization algorithm.

Nonlinear Optimization

A controller according to some embodiments of the present disclosure mayuse nonlinear optimization to determine the control variables. Morespecifically, the controller may utilize a nonlinear optimizationalgorithm, for example, to find economically optimal control variablesto effectuate one or more changes to the electrical system to achieveeconomic efficiency (e.g., to operate the electrical system at as low acost as may be possible, given the circumstances).

Nonlinear continuous optimization or nonlinear programming is similar togeneralized continuous optimization and describes methods for optimizingcontinuous functions that may be nonlinear, or where the constraints maybe nonlinear.

Multi-Variable Optimization

A controller according to some embodiments of the present disclosure mayuse multi-variable optimization to determine the control variables. Morespecifically, the controller may utilize a multivariable optimizationalgorithm, for example, to find economically optimal control variablesto effectuate one or more changes to the electrical system to achieveeconomic efficiency (e.g., to operate the electrical system at as low acost as may be possible, given the circumstances).

In the examples of FIGS. 3 and 4, the considered equationƒ(x)=100(x ₂ −x ₁₂)²+(1−x ₁)²is a multi-variable equation. In other words, x is a set comprised ofmore than one element. Therefore, the optimization algorithm is“multivariable.” A subclass of optimization algorithms is themultivariable optimization algorithm that can find the minimum of ƒ(x)when x has more than one element. Thus, the example of FIGS. 3 and 4 mayillustrate solving for a generalized constrained continuousmulti-variable optimization problem.

Economically Optimizing Electrical System Controller

A controller, according to one embodiment of the present disclosure,will now be described to provide an example of using optimization tocontrol an electrical system. An objective of using optimization may beto minimize the total electrical system operating cost during a periodof time. For example, the approach of the controller may be to minimizethe operating cost during an upcoming time domain, or future timedomain, which may extend from the present time by some number of hours(e.g., integer numbers of hours, fractions of hours, or combinationsthereof). As another example, the upcoming time domain, or future timedomain, may extend from a future time by some number of hours. Costsincluded in the total electrical system operating cost may includeelectricity supply charges, electricity demand charges, a batterydegradation cost, equipment degradation cost, efficiency losses, etc.Benefits, such as incentive payments, which may reduce the electricalsystem operating cost, may be incorporated (e.g., as negative numbers orvalues) or otherwise considered. Other cost may be associated with achange in energy in the ESS such that adding energy between thebeginning and the end of the future time domain is valued. Other costsmay be related to reserve energy in an ESS such as for backup powerpurposes. All of the costs and benefits can be summed into a net costfunction, which may be referred to as simply the “cost function.”

In certain embodiments, a control parameter set X can be defined (inconjunction with a control law) that is to be applied to the electricalsystem, how they should behave, and at what times in the future timedomain they should be applied. In some embodiments, the cost functioncan be evaluated by performing a simulation of electrical systemoperation with a provided set X of control parameters. The control lawsspecify how to use X and the process variables to determine the controlvariables. The cost function can then be prepared or otherwise developedto consider the control parameter set X.

For example, a cost ƒ_(c)(X) may consider the control parameter valuesin X and return the scalar net cost of operating the electrical systemwith those control parameter values. All or part of the controlparameter set X can be treated as a variable set X_(x) (e.g., x asdescribed above) in an optimization problem. The remaining part of X,X_(logic), may be determined by other means such as logic (for examplelogic based on constraints, inputs, other control parameters,mathematical formulas, etc.). Any constraints involving X_(x) can bedefined, if so desired. Then, an optimization algorithm can be executedto solve for the optimal X_(x). We can denote X_(opt) as the combinedX_(x) and X_(logic) values that minimize the cost function subject tothe constraints, if any. Since X_(opt) represents the controlparameters, this example process fully specifies the control that willprovide minimum cost (e.g., optimal) operation during the future timedomain. Furthermore, to the limits of computing capability, thisoptimization can consider the continuous domain of possible X_(x)values, not just a finite set of discrete possibilities. This examplemethod continuously can “tune” possible control sets until an optimalset is found. As shorthand notation, we may refer to these certainexample embodiments of an economically optimizing electrical systemcontroller (EOESC).

Some of the many advantages of using an EOESC, according to certainembodiments, compared to other electrical system controllers aresignificant:

1) Any number of value streams may be represented in the cost function,giving the EOESC an ability to optimize on all possible value streamsand costs simultaneously. As an example, generalized continuousoptimization can be used to effectively determine the best control givenboth ToU supply charge reduction and demand charge reductionsimultaneously, all while still considering battery degradation cost.

2) With a sufficiently robust optimization algorithm, only the costfunction, control law, and control parameter definitions need bedeveloped. Once these three components are developed, they can berelatively easily maintained and expanded upon.

3) An EOESC can yield a true economically optimum control solution tomachine or processor precision limited only by the cost function,control laws, and control parameter definitions.

4) An EOESC may yield not only a control to be applied at the presenttime, but also the planned sequence of future controls. This means oneexecution of an EOESC can generate a lasting set of controls that can beused into the future rather than a single control to be applied at thepresent. This can be useful in case a) the optimization algorithm takesa significant amount of time to execute, or b) there is a communicationinterruption between the processor calculating the control parametervalues and the processor interpreting the control parameters and sendingcontrol variables to the electrical system.

FIG. 5 is a control diagram of an electrical system 500, according toone embodiment of the present disclosure, including an EOESC 510. Statedotherwise, FIG. 5 is a diagram of a system architecture of theelectrical system 500 including the EOESC 510, according to oneembodiment. The electrical system 500 comprises a building electricalsystem 502 that is controlled by the EOESC 510. The building electricalsystem 502 includes one or more loads 522, one or more generators 524,an energy storage system (ESS) 526, and one or more sensors 528 (e.g.,meters) to provide measurements or other indication(s) of a state of thebuilding electrical system 502. The building electrical system 502 iscoupled to an electrical utility distribution system 550, and thereforemay be considered on-grid. Similar diagrams can be drawn for otherapplications such as a photovoltaic generator plant and an off-gridbuilding.

The EOESC 510 receives or otherwise obtains a configuration of theelectrical system, external inputs, and process variables and producescontrol variables to be sent to the electrical system 502 to effectuatea change to the electrical system toward meeting a controller objectivefor economical optimization of the electrical system, for example duringan upcoming time domain. The EOESC 510 may include electronic hardwareand software to process the inputs (e.g., the configuration of theelectrical system, external inputs, and process variables) to determinevalues for each of the control variables. The EOESC 510 may include oneor more processors and suitable storage media which stores programmingin the form of executable instructions which are executed by theprocessors to implement the control processes.

In the embodiment of FIG. 5, the EOESC 510 includes an economicoptimizer (EO) 530 and a dynamic manager 540 (or high speed controller(HSC)). The EO 530 according to some embodiments is presumed to haveability to measure or obtain a current date and time. The EO 530 maydetermine a set of values for a control parameter set X and provide theset of values and/or the control parameter set X to the HSC 540. The EO530 uses a generalized optimization algorithm to determine an optimalset of values for the control parameter set X_(opt). The HSC 540utilizes the set of values for the control parameter set X (e.g., anoptimal control parameter set X_(opt)) to determine the controlvariables to communicate to the electrical system 502. The HSC 540 insome embodiments is also presumed to have ability to measure or obtain acurrent date and time. The two part approach of the EOESC 510, namelythe EO 530 determining control parameters and then the HSC 540determining the control variables, enables generation of a lasting setof controls, or a control solution (or plan) that can be used into thefuture rather than a single control to be applied at the present.Preparing a lasting control solution can be useful if the optimizationalgorithm takes a significant amount of time to execute. Preparing alasting control solution can also be useful if there is a communicationinterruption between the calculating of the control parameter values andthe processor interpreting the control parameters and sending controlvariables to the electrical system 502. The two part approach of theEOESC 510 also enables the EO 530 to be disposed or positioned at adifferent location from the HSC 540. In this way, intensive computingoperations that optimization may require can be performed by resourceswith higher processing capability that may be located remote from thebuilding electrical system 502. These intensive computing operations maybe performed, for example, at a data center or server center (e.g., inthe cloud).

In some embodiments, a future time domain begins at the time the EO 530executes and can theoretically extend any amount of time. In certainembodiments, analysis and experimentation suggest that a future timedomain extent of 24 to 48 hours generates sufficiently optimal solutionsin most cases.

As can be appreciated, the EOESC 510 of FIG. 5 may be arranged andconfigured differently from that shown in FIG. 5, in other embodiments.For example, instead of the EO 530 passing the control parameter setX_(opt) (the full set of control parameters found by a generalizedoptimization algorithm of the EO 530) to the HSC 540, the EO 530 canpass a subset of X_(opt) t the HSC 540. Similarly, the EO 530 can passX_(opt) and additional control parameters to the HSC 540 that are notcontained in X_(opt). Likewise, the EO 530 can pass modified elements ofX_(opt) to the HSC 540. In one embodiment, the EO 530 finds a subsetX_(x) of the optimal X, but then determines additional controlparameters X_(logic), and passes X_(logic) together with X_(x) to theHSC 540. In other words, in this example, the X_(x) values are to bedetermined through an optimization process of the EO 530 and theX_(logic) values can be determined from logic. An objective of the EO530 is to determine the values for each control parameter whether usingoptimization and/or logic.

For brevity in this disclosure, keeping in mind embodiments where Xconsists of independent (X_(x)) parameters and dependent (X_(logic))parameters, when describing optimization of a cost function versus X,what is meant is variation of the independent variables X_(x) until anoptimum (e.g., minimum) cost function value is determined. In this case,the resulting X_(opt) will consist of the combined optimum X_(x)parameters and associated X_(logic) parameters.

In one embodiment, the EOESC 510 and one or more of its components areexecuted as software or firmware (for example stored on non-transitorymedia, such as appropriate memory) by one or more processors. Forexample, the EO 530 may comprise one or more processors to process theinputs and generate the set of values for the control parameter set X.Similarly, the HSC 540 may comprise one or more processors to processthe control parameter set X and the process variables and generate thecontrol variables. The processors may be computers, microcontrollers,CPUs, logic devices, or any other digital or analog device that canoperate on pre-programmed instructions. If more than one processor isused, they can be connected electrically, wirelessly, or optically topass signals between one another. In addition, the control variables canbe communicated to the electrical system components electrically,wirelessly, or optically or by any other means. The processor has theability to store or remember values, arrays, and matrices, which can beviewed as multi-dimensional arrays, in some embodiments. This storagemay be performed using one or more memory devices, such as read accessmemory (RAM, disk drives, etc.).

FIG. 6 is a flow diagram of a method 600 of controlling an electricalsystem, according to one embodiment of the present disclosure. Themethod 600 includes two separate processes, namely an economic optimizer(EO) process 601 a and a high speed controller (HSC) process 601 b. TheHSC process 601 b may also be referred to herein as a dynamic managerprocess 601 b. The HSC process 601 b may utilize a control parameter setX determined by the EO process 601 a. Nevertheless, the HSC process 601b may execute separate from, or even independent from the EO process 601a, based on a control parameter set X determined at an earlier time bythe EO process 601 a. Because the EO process 601 a can run separate anddistinct from the HSC process 601 b, the execution of these processes601 a, 601 b may be collocated on a single system or isolated on remotesystems.

The EO process 601 a may be a computer-implemented process executed byone or more computing devices, such as the EO 530 of FIG. 5. The EOprocess 601 a may receive 602 a configuration, or a set of configurationelements, of the electrical system. The configuration may specify one ormore constraints of the electrical system. The configuration may specifyone or more constants of the electrical system. The configuration mayspecify one or more cost elements associated with operation of theelectrical system. The cost elements may include one or more of anelectricity cost (e.g., an electricity supply charge, an electricitydemand charge), a battery degradation cost, equipment degradation cost,a tariff definition (e.g., an electricity supply tariff providing ToUsupply rates and associated time windows, or an electricity demandtariff providing demand rates and associated time windows), a cost oflocal generation, penalties associated with deviation from an operatingplan (e.g., a prescribed operating plan, a contracted operating plan),costs or benefits associated with a change in energy in the ESS suchthat adding energy between the beginning and the end of the future timedomain is valued, costs or benefits (e.g., a payment) for contractedmaneuvers, costs or benefits associated with the amount of energy storedin an ESS as a function of time, a value of comfort that may be afunction of other process variables such as building temperature.

In certain embodiments, the set of configuration elements define the oneor more cost elements by specifying how to calculate an amount for eachof the one or more cost elements. For example, the definition of a costelement may include a formula for calculating the cost element.

In certain embodiments, the cost elements specified by the configurationelements may include one or more incentives associated with operation ofthe electrical system. An incentive may be considered as a negativecost. The one or more incentives may include one or more of an incentiverevenue, a demand response revenue, a value of reserve energy or batterycapacity (e.g., for backup power as a function of time), a contractedmaneuver, revenue for demand response opportunities, revenue forancillary services, and revenue associated with deviation from anoperating plan (e.g., a prescribed operating plan, a contractedoperating plan).

In other embodiments, the configuration elements may specify how tocalculate an amount for one or more of the cost elements. For example, aformula may be provided that indicates how to calculate a given costelement.

External inputs may also be received 604. The external inputs mayprovide indication of one or more conditions that are external to thecontroller and/or the electrical system. For example, the externalinputs may provide indication of the temperature, weather conditions(e.g., patterns, forecasts), and the like.

Process variables are received 606. The process variables provide one ormore measurements of a current state of the electrical system. The setof process variables can be used to determine progress toward meeting anobjective for economical optimization of the electrical system. Theprocess variables may be feedback in a control loop for controlling theelectrical system.

The EO process 601 a may include predicting 608 a local load and/orgeneration during an upcoming time domain. The predicted local loadand/or local generation may be stored for later consideration. Forexample, the predicted load and/or generation may be used in a laterprocess of evaluating the cost function during a minimization of thecost function.

A control parameter set X may be defined 610 to be applied during anupcoming time domain. In defining the control parameter set X, themeaning of each element of X is established. A first aspect in defining610 the control parameter set X may include selecting a control law.Then, for example, X may be defined 610 as a matrix of values such thateach column of X represents a set of control parameters for the selectedcontrol law to be applied during a particular time segment of the futuretime domain. In this example, the rows of X represent individual controlparameters to be used by the control law. Further to this example, thefirst row of X can represent the nominal ESS power during a specifictime segment of the future time domain. Likewise, X may be furtherdefined such that the second row of X is the maximum demand limit (e.g.,a maximum demand setpoint). A second aspect in defining 610 may includesplitting the upcoming time domain into sensible segments and selectingthe meaning of the control parameters to use during each segment. Theupcoming future time domain may be split into different numbers ofsegments depending on what events are coming up during the future timedomain. For example, if there are no supply charges, and there is onlyone demand period, the upcoming time domain may be split into a fewsegments. But if there is a complicated scenario with many changingrates and constraints, the upcoming time domain may be split into manysegments. Lastly, in defining 610 the control parameters X, some controlparameters X_(x) may be marked for determination using optimization, andothers X_(logic) may be marked for determination using logic (forexample logic based on constraints, inputs, other control parameters,mathematical formulas, etc.).

The EO process 601 a may also prepare 612 or obtain a cost function.Preparing 612 the cost function may be optional and can increaseexecution efficiency by pre-calculating certain values that will beneeded each time the cost function is evaluated. The cost function maybe prepared 612 (or configured) to include or account for anyconstraints on the electrical system.

With the control parameter set X defined 610 and the cost functionprepared 612, the EO process 601 a can execute 614 a minimization oroptimization of the cost function resulting in the optimal controlparameter set X_(opt). For example, a continuous optimization algorithmmay be used to identify an optimal set of values for the controlparameter set X_(opt) (e.g., to minimize the cost function) inaccordance with the one or more constraints and the one or more costelements. The continuous optimization algorithm may be one of manytypes. For example, it may be a generalized continuous optimizationalgorithm. The continuous optimization algorithm may be a multivariablecontinuous optimization algorithm. The continuous optimization algorithmmay be a constrained continuous optimization algorithm. The continuousoptimization algorithm may be a Newton-type algorithm. It may be astochastic-type algorithm such as Covariance Matrix Adaption EvolutionStrategy (CMAES). Other algorithms that can be used are BOBYQA (BoundOptimization by Quadratic Approximation) and COBYLA (ConstrainedOptimization by Linear Approximation).

To execute the optimization of the cost function, the cost function maybe evaluated many times. Each time, the evaluation may includeperforming a simulation of the electrical system operating during thefuture time domain with a provided control parameter set X, and thencalculating the cost associated with that resulting simulated operation.The cost function may include or otherwise account for the one or morecost elements received 602 in the configuration. For example, the costfunction may be a summation of the one or more cost elements (includingany negative costs, such as incentive, revenues, and the like). In thisexample, the optimization step 614 would find X_(opt) that minimizes thecost function. The cost function may also include or otherwise accountfor the one or more constraints on the electrical system. The costfunction may include or otherwise account for any values associated withthe electrical system that may be received 602 in the configuration.

The cost function may also evaluate another economic metric such aspayback period, internal rate of return (IRR), return on investment(ROI), net present value (NPV), or carbon emission. In these examples,the function to minimize or maximize would be more appropriately termedan “objective function.” In case the objective function represents avalue that should be maximized such as IRR, ROI, or NPV, the optimizershould be set up to maximize the objective function when executing 614,or the objective function could be multiplied by −1 before minimization.Therefore, as can be appreciated, elsewhere in this disclosure,“minimizing” the “cost function” may also be more generally consideredfor other embodiments as “optimizing” an “objective function.”

The continuous optimization algorithm may execute the cost function(e.g., simulate the upcoming time domain) a plurality of times withvarious parameter sets X to identify an optimal set of values for thecontrol parameter set X_(opt) to minimize the cost function. The costfunction may include a summation of the one or more cost elements andevaluating the cost function may include returning a summation of theone or more cost elements incurred during the simulated operation of thecontrol system over the upcoming time domain.

The optimal control parameter set X_(opt) is then output 616. In someembodiments, the output 616 of the optimal control parameter set X_(opt)may be stored locally, such as to memory, storage, circuitry, and/or aprocessor disposed local to the EO process 601 a. In some embodiments,the outputting 616 may include transmission of the optimal controlparameter set X_(opt) over a communication network to a remote computingdevice, such as the HSC 540 of FIG. 5.

The EO process 601 a repeats for a next upcoming time domain (a newupcoming time domain). A determination 618 is made whether a newconfiguration is available. If yes, then the EO process 601 a receives602 the new configuration. If no, then the EO process 601 a may skipreceiving 602 the configuration and simply receive 604 the externalinputs.

As can be appreciated, in other embodiments an EO process may beconfigured differently, to perform operations in a differing order, orto perform additional and/or different operations. In certainembodiments, an EO process may determine values for a set of controlvariables to provide to the electrical system to effectuate a change tothe electrical system toward meeting the controller objective foreconomical optimization of the electrical system during an upcoming timedomain, rather than determining values for a set of control parametersto be communicated to a HSC process. The EO process may provide thecontrol variables directly to the electrical system, or to an HSCprocess for timely communication to the electrical system at, before, orduring the upcoming time domain.

The HSC process 601 b may be a computer-implemented process executed byone or more computing devices, such as the HSC 540 of FIG. 5. The HSCprocess 601 b may receive 622 a control parameter set X, such as theoptimal control parameter set X_(opt) output 616 by the EO process 601a. Process variables are also received 624 from the electrical system.The process variables include information, or feedback, about a currentstate or status of the electrical system and/or one or more componentstherein.

The HSC process 601 b determines 626 values for a set of controlvariables for controlling one or more components of the electricalsystem at the current time. The HSC process 601 b determines 626 thevalues for the control variables by using the optimal control parameterset X_(opt) in conjunction with a control law. The control laws specifyhow to determine the control variables from X (or X_(opt)) and theprocess variables. Stated another way, the control law enforces thedefinition of X. For example, for a control parameter set X defined suchthat a particular element, X, is an upper bound on demand to be appliedat the present time, the control law may compare process variables suchas the unadjusted demand to X. If unadjusted building demand exceeds X,the control law may respond with a command (in the form of a controlvariable) to instruct the ESS to discharge at a rate that will make theadjusted demand equal to or less than X.

The control variables (including any newly determined values) are thenoutput 628 from the HSC process 601 b. The control variables arecommunicated to the electrical system and/or one or more componentstherein. Outputting 628 the control variables may include timelydelivery of the control variables to the electrical system at, before,or during the upcoming time domain and/or applicable time segmentthereof. The timely delivery of the control variables may include anobjective to effectuate a desired change or adjustment to the electricalsystem during the upcoming time domain.

A determination 630 is then made whether a new control parameter set X(and/or values thereof) is available. If yes, then the new controlparameter set X (or simply the values thereof) is received 622 and HSCprocess 601 b repeats. If no, then the HSC process 601 b repeats withoutreceiving 622 a new control parameter set X, such as a new optimalcontrol parameter set X_(opt).

As can be appreciated, in other embodiments an HSC process may beconfigured differently, to perform operations in a differing order, orto perform additional and/or different operations. For example, incertain embodiments, an HSC process may simply receive values for theset of control variables and coordinate timely delivery of appropriatecontrol variables to effectuate a change to the electrical system at acorresponding time segment of the upcoming time domain.

The example embodiment of a control 510 in FIG. 5 and a control method600 in FIG. 6 illustrate a two-piece or staged controller, which split acontrol problem into two pieces (e.g., a low speed optimizer and a highspeed dynamic manager (or high speed controller (HSC)). The two stagesor pieces of the controller, namely an optimizer and a dynamic manager,are described more fully the sections below. Nevertheless, as can beappreciated, in certain embodiments a single stage approach to a controlproblem may be utilized to determine optimal control values to commandan electrical system.

Economic Optimizer (EO)

Greater detail will now be provided about some elements of an EO,according to some embodiments of the present disclosure.

Predicting a Load/Generation of an Upcoming Time Domain

In many electrical system control applications, a load of the electricalsystem (e.g., a building load) changes over time. Load can be measuredas power or as energy change over some specified time period, and isoften measured in units of kW. As noted above with reference to FIG. 6,an EO process 601 a may predict 608 a local load and/or generationduring an upcoming time domain.

FIG. 7 is a flow diagram of a method 700 of predicting load and/orgeneration of an electrical system during an upcoming time domain. Acontroller, according to some embodiments of the present disclosure, mayhave the ability to predict the changing load that may be realizedduring an upcoming time domain. These load and generation predictionsmay be used when the cost function is evaluated. To account for and reapa benefit from some types of value streams such as demand chargereduction, an accurate estimate of the upcoming load can be important.An accurate projection of a load during an upcoming time domain enablesan EO to make better control decisions to capitalize on value streamssuch as demand charge reduction.

A method of predicting load, according to one embodiment of the presentdisclosure, may perform a load prediction considering historic periodictrends or shapes such as a daily trend or shape. The load prediction canexecute every time an EO executes an EO process, or it can execute moreor less frequently. The load prediction may be executed by performing aregression of a parameterized historic load shape against historic loaddata (typically less than or equal to 24 hours) in one embodiment.Regression algorithms such as least squares may be used. A compilationof historic trends may be recorded as a historic average (or typical)profile or an average load shape. The historic average profile oraverage load shape may be a daily (24-hour) historic average profilethat represents a typical day. The compilation of historic observationsand/or historic average profile may be received from another system, ormay be gathered and compiled (or learned) as part of the method ofpredicting load, as will be explained below with reference to FIG. 8.

Referring to FIG. 7, historic observations of load are recorded 702. Forexample, the last h hours of historic observations of load may becontinuously recorded and stored in memory, each measurement having acorresponding time of day at which time it was measured in an array pairhistoric_load_observed and historic_load_observed_time_of_day. The lasth hours can be any amount of time, but in one embodiment, it is between3 and 18 hours.

Assume for now a daily average load shape array or vector is in memorynamed avg_load_shape, each with a corresponding arrayavg_load_shape_time_of day of the same length. The avg_load_shape andavg_load_shape_time_of day represents a historic average profile and/orhistoric trends. The time domain of avg_load_shape_time_of day is 24hours, and the time interval of discretization of avg_load_shape_time_ofday could be any value. Between 5 and 120 minutes may be used, dependingon the application, in some embodiments. As an example, if the intervalof discretization is chosen to be 30 minutes, there will be 48 valuescomprising avg_load_shape and 48 values comprisingavg_load_shape_time_of day.

An interpolation is performed 704 to find the avg_load_shape values ateach of the times in historic_load_observed_time_of_day. Call this newinterpolated array avg_load_shape_interpolated. Consider mathematicallyavg_load_shape_interpolated with a scale and offset defined as: averageload shape_interpolated_p=avg_load_shape_interpolated*scale+offset. Insome embodiments, the interpolation is a linear interpolation. In otherembodiments, the interpolation is a nonlinear interpolation.

A scale and offset are determined 706. For example, the method 700 mayperform a least squares regression to determine 706 scale and offsetthat minimize the sum of the squares of the error between average loadshape_interpolated_p and historic_load_observed. Call these resultingscale and offset values scale_fit and offset_fit. In some embodiments,the determining 706 of scale and offset can utilize weighted leastsquares techniques that favor more recent observations.

A corrected daily average load shape is generated 708 based on the scaleand/or offset. For example, a corrected load shape may be generated 708for a full day asavg_load_shape_fit=avg_load_shape*scale_fit+offset_fit.

The future load values can then be estimated 710, such as byinterpolating. A future load value at any time of day in the future timedomain can now be estimated by interpolating 710 to that time of dayfrom the pair of arrays avg_load_shape_fit and avg_load_shape_time_ofday.

FIG. 8 provides a graphical representation 800 of predicting load and/orgeneration of an electrical system during an upcoming time domain,according to one embodiment. The graphical representation may track themethod 700 of FIG. 7. A historic average daily load shape 802 isgenerated or learned. Historic observations of load 804 are generated. Afitted current day historic load shape 806 is generated. A predictedload shape 808 can then be generated. The predicted load shape 808 isfairly accurate based on an actual load shape observed 810.

One advantage of a method of predicting load and/or generation of anelectrical system during an upcoming time domain, such as previouslydescribed, compared to other methods, is that such method can adapt tochanges in load scale and offset while still conforming to the generalexpected average daily load shape.

In other embodiments, the predicted load can be further modified afterit has been calculated with the above method. For example, the predictedload may be modified to bring it closer to the daily average historicload as the prediction time becomes farther away from the time theprediction was made.

As mentioned previously, in certain embodiments, a method of predictingload may include compiling or otherwise gathering historic trends todetermine a historic average profile or an average load shape on atypical day. One possible method for load learning (e.g., determiningand updating avg_load_shape) is as follows:

1) Create arrays avg_load_shape and avg_load_shape_time_of_day which aredefined as above. Initialize avg_load_shape to some reasonable valuesuch as a constant load equal to the current load, or to an initial loadshape provided in the configuration information.

2) Begin recording load observations and storing each along with itsassociated time of day in historic_load_observed_2 andhistoric_load_observed_time_of_day_2.

3) After at least one full day of load observations has been stored inhistoric_load_observed_2 and historic_load_observed_time_of_day_2,assign a last 24 hours of load data in historic_load_observed_2 to atemporary array in memory named avg_load_shape_last_24_hr which has thesame number of elements as avg_load_shape, and whose associated time ofday vector is also avg_load_shape_time_of day. To perform thisoperation, a number of well-known approaches can be used includingregression and interpolation, linear weighted averaging, and nearestneighbor.

4) Assign avg_load_shape_last_24_hr to avg_load_shape.

5) Wait for a new 24-hour period of data to be recorded inhistoric_load_observed_2 and historic_load_observed_time_of_day_2.

6) Again assign the last 24 hours of load data inhistoric_load_observed_2 to a temporary array in memory namedavg_load_shape_last_24_hr which has the same number of elements asavg_load_shape, and whose associated time of day vector is alsoavg_load_shape_time_of day. Again, to perform this operation, a numberof well-known approaches can be used including regression andinterpolation, linear weighted averaging, and nearest neighbor.

7) Update each element k of avg_load_shape by performing a digitalfilter operation with it and avg_load_shape_last_24_hr. In oneembodiment, this digital filter operation is performed as a first orderinfinite impulse response (IIR) filter with the inputs being elements kof avg_load_shape_last_24_hr and the original avg_load_shape, and theoutput being a modified element k of avg_load_shape. In one embodiment,the time constant of the first-order IIR filter is set to between 2 and60 days. Other types of digital filters including low pass digitalfilters may be used.

8) Return to 5 above.

Some unique advantages of this embodiment of learning and predictingload and/or generation are obtained. For example, previous loadinformation to construct an average daily load shape is not required. Itlearns the average daily load shape day-by-day as it observes the actualload. It requires very little memory: only enough for 24-hours ofobserved load, the load shape itself (24-hours), and supporting arraysand scalar values. Due to the filtering described above, it allows theload shape to change seasonally as seasonal changes occur and areobserved. In other words, it is adaptive.

The method of FIG. 7 and illustration of FIG. 8 describe one embodimentof a method for predicting load. If a local generator is present in anelectrical system, the same or a similar method can be applied forpredicting generation. Instead of a “load shape,” a “generation shape”can be stored in memory. For generators where the generation is known ata particular time (such as a photovoltaic generator which would beexpected to have nearly zero generation at nighttime), the predictionand generation shape can be constrained to specific values at specifictimes of the day. In this case, instead of using regression to determineboth scale and offset, perhaps only scale may be needed.

Another aspect of this embodiment of a method to predict load and/orgeneration is the ability to incorporate external inputs to modify theprediction of load or generation. In one embodiment, the prediction ismade as already described, then the prediction is modified with the useof external information such as a weather forecast or building occupancyforecast.

By having a pre-determined differential relationship for load (orgeneration) vs. input data, the prediction can be modified in oneexample as follows:

1) An external input is read which contains a forecasted variablex_(input,forecast).

2) From configuration information, a value of the differential

$\left\lbrack \frac{d({load})}{d\left( x_{input} \right)} \right\rbrack_{x_{nom}}$is available which is valid near some nominal x_(input) value ofx_(nom).

3) The predicted load can be modified to account for the differencebetween the input x_(input) and x_(nom):

${load}_{{predicted},\;{modified}} = {{load}_{predicted} + {\left( {x_{{input},\;{forecast}} - x_{nom}} \right) \times \left\lbrack \frac{d({load})}{d\left( x_{input} \right)} \right\rbrack_{x_{nom}}}}$

The same approach can be used for modifying a generation prediction byreplacing “load” with “generation” in the formula above.

Define the Control Parameter Set X

Defining the Control Parameter Set X involves defining or otherwisespecifying times at which each control parameter is to be applied duringa future time domain, and the control law(s) that are to be applied ateach time in the future time domain.

An EO, according to certain embodiments of the present disclosure, isconfigured to define the control parameter set X. While there are manyways to define a control parameter set X, three possible approaches are:

1. a single set of parameters of a control law to be applied during theentire upcoming time domain;

2. a sequence of parameter sets that are each to be applied to a singlecontrol law at different contiguous sequential time intervals throughoutthe upcoming time domain; and

3. a sequence of parameters that specifies different control laws to beapplied at different contiguous sequential time intervals throughout thefuture time domain.

An example of Approach 1 above of a single set of parameters of thecontrol parameter set X (and example values) for a four-parametercontrol law is shown in Table 1.

TABLE 1 Pa- Ex- rame- ample ter Description Value P_(nom) Nominal ESSpower (or discharge power if negative) −40 W to be applied in theabsence of other constraints or rules (such as those related to UB, UB₀,or LB below). UB Upper bound on adjusted demand (e.g., an upper 100 kWsetpoint). Not to be exceeded unless the ESS is incapable of dischargingat sufficient power. UB₀ Upper bound on electrical system adjusteddemand  80 kW (e.g., an upper setpoint) not to be actively exceeded(e.g., electrical system adjusted demand may exceed this value only withESS power less than or equal to 0). LB Lower bound on adjusted net power(e.g., a lower  0 kW setpoint). Sometimes referred to as “minimumimport,” or, if 0, “zero export.” Adjusted net power will be kept abovethis value unless the ESS is incapable of charging at sufficient powerand generators cannot be throttled sufficiently.

Approaches 2 and 3 above utilize segmentation of the future time domain.

FIG. 9 is a graph 900 illustrating one example of segmenting an upcomingtime domain into a plurality of time segments 902. A plot 904 ofpredicted unadjusted net power (kW) versus future time (e.g., of anupcoming time domain) is provided. A plot 906 of energy supply rate($/kWh) versus future time is also provided. A plot 908 of a demand rate($/kW) versus future time is also provided. A 25-hour future time domainis segmented into nine discrete sequential time segments 902 (e.g., i=1,2, 3, 4, 5, 6, 7, 8, 9). Each segment 902 will be assigned a single setof one or more parameters from the control parameter set X to be appliedduring that time segment.

Segmentation of the future time domain can be done in many ways. In oneembodiment, segmentation is performed such that:

i. the electric rates (both supply and demand) are constant within eachtime segment,

ii. the number of segments is minimized but large enough to provide adifferent segment for each region of the future time domain that isexpected to have significantly different operating behavior orconditions, and

iii. the segment length does not exceed a prescribed maximum segmentlength.

In cases where rates are changing very frequently (every hour forexample), some minimum time segment length can be specified (every fourhours for example) to reduce the number of time segments while stillmaintaining acceptable computational fidelity. Likewise, a maximumsegment length (for example six hours) may also be prescribed toincrease computational fidelity.

Smaller numbers of segments are less burdensome on the EO processorcomputationally, while large numbers of segments provide higher fidelityin the final optimized solution. A desirable segment length of between0.5 and 6 hours in some embodiments has been found to provide a goodbalance between these criteria.

The time segments of the upcoming time domain may be defined such thatone or more of supply rate cost elements and delivery rate cost elementsare constant during each time segment. The time segments of the upcomingtime domain may be defined such that one or more of contractedmaneuvers, demand response maneuvers, and ancillary service maneuversare continuous during each time segment.

FIG. 9 also illustrates a representation 910 of an example of controlparameter set X that includes multiple sets of parameters. The controlparameter set X is for a three-parameter control law, which may bedefined similar to the set illustrated above in Table 1, but withoutUB₀. The values for the parameters are not initialized, but the cells ofthe table X in FIG. 9 represent a parameter for which a value may beassociated. In this example, the un-shaded values (X_(x)) are to bedetermined through an optimization process of the EO and the shadedvalues (X_(logic)) can be determined from logic. An objective of the EOis to fill in the values for each control parameter that minimizes thecost of operating the electrical system during the future time domain.

In some instances, it may make sense for an EO (or an EOESC) to operatewith a single control parameter (e.g., a single set with a singleelement in X, such as P_(nom)) or with multiple control parameters (asingle set of multiple elements in X, such as P_(nom), UB, and LB) to beapplied during the entire future time domain. In these two cases, thefuture time domain would be segmented into only one time segment 902.Correspondingly, the EO would only consider control parameters that areconstant over the whole future time domain in this example.

Prepare the Cost Function

An EO, according to certain embodiments of the present disclosure,prepares or otherwise obtains a cost function. As already mentioned, thecost function ƒ_(c)(X) is a function that considers particular controlparameters (e.g., control parameter set X) and returns the scalar netcost of operating the electrical system with X during the future timedomain.

FIG. 10 is a diagrammatic representation of a cost function evaluationmodule 1000 (or cost function evaluator) that implements a cost functionƒ_(c)(X) 1002 that includes models 1004 for one or more electricalsystem components (e.g., loads, generators, ESSs). The cost functionƒ_(c)(X) 1002 receives as inputs initialization information 1006 andcontrol parameters 1008 (e.g., a control parameter set X). The costfunction ƒ_(c)(X) 1002 provides as an output a scalar value 1010representing a cost of operating the electrical system during the futuretime domain.

The scalar value 1010 representing the cost, which is the output of thecost function ƒ_(c)(X) 1002, can have a variety of different units indifferent examples. For example, it can have units of any currency.Alternately, the cost can have units of anything with an associated costor value such as electrical energy or energy credits. The cost can alsobe an absolute cost, cost per future time domain, or a cost per unittime such as cost per day. In one embodiment, the units of cost are U.S.dollars per day.

Prior to using the cost function, several elements of it can beinitialized. The initialization information that is provided in oneembodiment is:

Date and time. For determining the applicable electric utility rates.

Future time domain extent. For defining the time extent of the costcalculation.

Electric utility tariff definition. This is a set of parameters thatdefines how the electrical utility calculates charges.

Electrical system configuration. These configuration elements specifythe sizes and configuration of the components of the electrical system.An example for a battery energy storage system is the energy capacity ofthe energy storage device.

Electrical system component model parameters. These model parameterswork in conjunction with analytic or numerical models to describe thephysical and electrical behavior and relationships governing theoperation of electrical components in the electrical system. For batteryenergy storage systems, a “battery model” is a component, and theseparameters specify the properties of the battery such as its Ohmicefficiency, Coulombic efficiency, and degradation rate as a function ofits usage.

States of the electrical system. This is information that specifies thestate of components in the electrical system that are important to theeconomic optimization. For battery energy storage systems, one examplestate is the SoC of the energy storage device.

Operational constraints. This information specifies any additionaloperational constraints on the electrical system such as minimum importpower.

Control law(s). The control law(s) associated with the definition of X.

Definition of control parameter set X. The definition of the controlparameter set X may indicate the times at which each control parameteris to be applied during a future time domain. The definition of thecontrol parameter set X may indicate which control law(s) are to beapplied at each time in the future time domain.

Net load (or power) prediction. Predicted unadjusted net load (orpredicted unadjusted net power) during the future time domain.

Pre-calculated values. While segments are defined, many values may becalculated that the cost function can use to increase executionefficiency (help it “evaluate” faster). Pre-calculation of these valuesmay be a desirable aspect of preparing the cost function ƒ_(c)(X) 1002to enable the cost function to be evaluated more efficiently (e.g.,faster, with fewer resources).

Preparing the cost function ƒ_(c)(X) 1002 can increase executionefficiency of the EO because values that would otherwise bere-calculated each time the cost function is evaluated (possible 1000sof times per EO iteration) are pre-calculated a single time.

FIG. 11 is a flow diagram of a process 1100 of preparing a cost functionƒ_(c)(X), according to one embodiment of the present disclosure. Costfunction initialization information may be received 1102. A simulationof electrical system operation is initialized 1104 with the received1102 cost function initialization information. Cost function values maybe pre-calculated 1106. The pre-calculated values may be stored 1100 forlater use during evaluation of the cost function.

In certain embodiments, defining a control parameter set X and preparinga cost function ƒ_(c)(X) may be accomplished in parallel.

Evaluation of the Cost Function

During execution of an EO, according to some embodiments of the presentdisclosure, the cost function is evaluated. During evaluation of thecost function, operation of the electrical system with the controlparameter set X is simulated. The simulation may be an aspect ofevaluating the cost function. Stated otherwise, one part of evaluatingthe cost function for a given control parameter set X may be simulatingoperation of the electrical system with that given control parameter setX. In the simulation, the previously predicted load and generation areapplied. The simulation takes place on the future time domain. As timeadvances through the future time domain in the simulation, costs andbenefits (as negative costs) can be accumulated. What is finallyreturned by the simulation is a representation of how the electricalsystem state may evolve during the future time domain with control X,and what costs may be incurred during that time.

In some embodiments, the cost function, when evaluated, returns the costof operating the electrical system with some specific control parameterset X. As can be appreciated, the cost of operating an electrical systemmay be very different, depending on X. So, evaluation of the costfunction includes a simulated operation of the electrical system with Xfirst. The result of the simulation can be used to estimate the costassociated with that scenario (e.g., the control parameter set X).

As noted previously, some of the costs considered by the cost functionin one embodiment are:

1. Electricity supply charges (both flat rates and ToU rates)

2. Electricity demand charges

3. Battery degradation cost

4. Reduction of energy stored in the energy storage system

5. Incentive maneuver benefits (as a negative number)

Electricity supply and demand charges have already been described. Formonthly demand charges, the charge may be calculated as an equivalentdaily charge by dividing the charge by approximately 30 days, or bydividing by some other number of days, depending on how many days areremaining in the billing cycle. Battery degradation cost is described ina later section. Reduction in energy stored in an ESS accounts for thedifference in value of the storage energy at the beginning of the futuretime domain compared to the end. Incentive maneuver benefits such asdemand response can be calculated as the benefit on a per day basis, butas a negative number.

During the cost function's electrical system simulation, severalvariables can be tracked and stored in memory. These include controlvariables, electrical power consumed by or supplied from variouselectrical systems, and the states of charge of any energy storagesystems. Other variables can also be tracked and stored to memory. Anyof the variables stored to memory can be output by the cost function.

FIG. 12 is a flow diagram of a method 1200 of evaluating a cost functionthat is received from an external source or otherwise unprepared,according to one embodiment of the present disclosure. Cost functioninitialization information may be received 1202. A simulation ofelectrical system operation is initialized 1204 with the received 1202cost function initialization information. The simulation is performed1206 of the electrical system operation with X over the future timedomain. A calculation 1208 of the cost components of operating theelectrical system with X is performed. The cost components are summed1210 to yield a net cost of operating the electrical system with X. Thenet cost of operating the electrical system with X is returned 1212 orotherwise output.

FIG. 13 is a flow diagram of a method 1300 of evaluating a prepared costfunction, according to one embodiment of the present disclosure. Thecost function may be prepared according to the method of FIG. 11.Pre-calculated values are received 1302 as inputs to the method 1300.The values may be pre-calculated during an operation to prepare the costfunction, such as the process of FIG. 11. A simulation is performed 1304of the electrical system operating with X over the future time domain. Acalculation 1306 of the cost components of operating the electricalsystem with X is performed. The cost components are summed 1308 to yielda net cost of operating the electrical system with X. The net cost ofoperating the electrical system with X is returned 1310 or otherwiseoutput.

In some embodiments, rather than returning the net cost of operating theelectrical system with X during the future time domain, what is returnedis the net cost of operating the electrical system with X as a cost perunit time (such as an operating cost in dollars per day). Returning aper day cost can provide better normalization between the different costelements that comprise the cost function. The cost per day for examplecan be determined by multiplying the cost of operating during the futuretime domain by 24 hours and dividing by the length (in hours) of thefuture time domain.

Execute Continuous Minimization of the Cost Function

With a prediction of load and generation made, the control parameter setX defined, and the cost function obtained and initialized and/orprepared, minimization of cost can be performed.

Minimization of the cost function may be performed by an optimizationprocess or module that is based on an optimization algorithm.Minimization (or optimization) may include evaluating the cost functioniteratively with different sets of values for the control parameter setX (e.g., trying different permutations from an initial value) until aminimum cost (e.g., a minimum value of the cost function) is determined.In other words, the algorithm may iteratively update or otherwise changevalues for the control parameter set X until the cost function value(e.g. result) converges at a minimum (e.g., within a prescribedtolerance). The iterative updating or changing of the values may includeperturbing or varying one or more values based on prior one or morevalues.

Termination criteria (e.g., a prescribed tolerance, a delta from a priorvalue, a prescribed number of iterations) may aid in determining whenconvergence at a minimum is achieved and stopping the iterations in afinite and reasonable amount of time. The number of iterations that maybe performed to determine a minimum could vary from one optimizationcycle to a next optimization cycle. The set of values of the controlparameter set X that results in the cost function returning the lowestvalue may be determined to be the optimal control parameter set X_(opt).

In one embodiment, a numerical or computational generalized constrainednonlinear continuous optimization (or minimization) algorithm is called(e.g., executed) by a computing device.

FIG. 14 is a diagrammatic representation of an optimization subsystem1400 that utilizes or otherwise implements an optimization algorithm1401 to determine an optimal control parameter set X_(opt) 1410, whichminimizes the cost function ƒ_(c)(X). In the embodiment of FIG. 14, theoptimization algorithm 1401 utilized by the optimization subsystem 1400may be a generalized constrained multivariable continuous optimization(or minimization) algorithm. A reference 1402 is provided for the costfunction ƒ_(c)(X).

The optimization algorithm can be implemented in software, hardware,firmware, or any combination of these. The optimization algorithm may beimplemented based on any approach from descriptions in literature,pre-written code, or developed from first principles. The optimizationalgorithm implementation can also be tailored to the specific problem ofelectrical system economic optimization, as appropriate in someembodiments.

Some algorithms for generalized constrained multivariable continuousoptimization include:

Trust-region reflective

Active set

SQP

Interior Point

Covariance Matrix Adaption Evolution Strategy (CMAES)

Bound Optimization by Quadratic Approximation (BOBYQA)

Constrained Optimization by Linear Approximation (COBYLA)

The optimization algorithm may also be a hybrid of more than oneoptimization algorithm. For example, the optimization algorithm may useCMAES to find a rough solution, then Interior Point to converge tightlyto a minimum cost. Such hybrid methods may produce robust convergence toan optimum solution in less time than single-algorithm methods.

Regardless of the algorithm chosen, it may be useful to make an initialguess of the control parameter set X 1404. This initial guess enables aniterative algorithm such as those listed above to more quickly find aminimum. In one embodiment, the initial guess is derived from theprevious EO execution results.

Any constraints 1406 on X can also be defined or otherwise provided.Example constraints include any minimum or maximum control parametersfor the electrical system.

An Example EO Result

FIG. 15 is a graph 1500 illustrating an example result from an EO for asmall battery energy storage system, using the same example upcomingtime domain, segmentation of the upcoming time domain into a pluralityof segments 902, predicted unadjusted net power plot 904, supply rateplot 906, daily demand rate plot 908, and representation 910 of thecontrol parameter set X as in FIG. 9.

The graph 1500 also includes plots for UB (kW) 1522, LB (kW) 1524, Pnom(kW) 1526, ESS power (kW) 1528, adjusted net power (kW) 1530, andbattery SoC 1532.

In FIG. 15, as in FIG. 9, the future time domain is split into ninesegments 902, and nine optimal sets of parameters 1502 were determined(e.g., a control parameter set X_(opt) 910 that includes values for nineoptimal sets of parameters, one optimal set of parameters for eachsegment 902). Daily demand charges are applicable and a net export ofenergy (e.g., to the grid) is not allowed in the illustrated example. Anobjective of the controller is to find an optimal sequence of electricalsystem control parameters.

The control parameter set X in this case is defined to include threeparameters: Pnom, UB, and LB as described above. In this example, duringexecution of the optimization algorithm, the optimal values in theunshaded boxes (X_(x)) of the representation 910 of X are determined,P_(nom) 1502 which is the battery inverter power (where charge valuesare positive and generation/discharge values are negative) during eachtime segment 902, and UB 1502 which is the upper limit on demand duringeach time segment 902). The date and time to apply each specific controlparameter is part of the definition of X. The shaded values (X_(logic),which includes LB and some UB values) in the representation 910 of X aredetermined by logic. For example, when no demand charge is applicable,the UB can be set to infinity. And since net export of power is notpermitted in this example, LB can be set to zero. There is no need todetermine optimal values for these shaded parameters when executing theoptimization because their values are dictated by constraints and logic.

Applying the optimal values of X, the expected cost per day of operatingthe electrical system in the example of FIG. 15 is $209.42 per day. Thistotal cost is the sum of the ToU supply cost ($248.52), the daily demandcost ($61.52), the cost of battery energy change ($−115.93), and thecost of battery degradation ($15.32).

As can be appreciated, in other embodiments, the EO may determine a setof control values for a set of control variables, instead of a controlparameter set X. The EO may determine the set of control values toeffectuate a change to the electrical system toward meeting a controllerobjective for economical optimization of the electrical system. The EOmay then output the control values or the set of control variables fordelivery directly to the electrical system. In such embodiment, the EOmay be a primary component of the controller and the controller may notinclude a dynamic manager (e.g., a high speed controller).

Dynamic Manager or High Speed Controller (HSC)

Greater detail will now be provided about some elements of a dynamicmanager, or an HSC, according to some embodiments of the presentdisclosure. Because the control parameter set X is passed to the highspeed controller, the definition of the control parameter set X may betightly linked to the HSC's control law. The interaction between anexample HSC and control parameter set X is described below.

Storing a Control Plan

As already mentioned, the control parameter set X can contain multiplesets of parameters and dates and times that those sets of parameters aremeant to be applied by the HSC. One embodiment of the present disclosuretakes this approach. Multiple sets of parameters are included in X, eachset of parameters with a date and time the set is intended to be appliedto the electrical system being controlled. Furthermore, eachcontrollable system within the electrical system can have a separate setof controls and date and time on which the set of controls is intendedto be applied. The HSC commits the full control parameter set X tomemory and applies each set of parameters therein to generate controlvariables to deliver to, and potentially effectuate a change to, theelectrical system at the specified times. Stated differently, the HSCstores and schedules a sequence of optimal sets of parameters, each tobe applied at an appropriate time. In other words, the HSC stores acontrol plan. This first task of storing and scheduling a sequence ofoptimal control parameter sets (e.g., a control plan) by the high speedcontroller provides distinct advantages over other controlarchitectures.

For example, storing of a control plan by the HSC reduces the frequencythat the computationally intensive (EO) portion of the controller isexecuted. This is because even if the first sequential time intervalexpires before the EO executes again, the HSC will switch to the nextsequential control set at the appropriate time. In other words, the EOdoes not have to execute again before the first sequential time intervalexpires since multiple optimal control sets can be queued up insequence.

As another example, storing of a control plan by the HSC enablesoperation (e.g., control of the electrical system) for significantperiods of time without additional EO output. This may be important forexample if the EO is executing in a remote processor such as a cloudcomputing environment and the HSC is running on a processor local to abuilding. If communication is lost for a period of time less than thefuture time domain, the HSC can continue to use the already-calculatedoptimal control parameter sets at the appropriate times. Althoughoperation in such a manner during outage may not be optimal (becausefresh EO executions are desirable as they take into account the latestdata), this approach may be favored compared with use of a singleinvariant control set or shutting down.

Application of Presently Applicable Control Parameters

A second task of the HSC, according to one embodiment, is to controlsome or all of the electrical system components within the electricalsystem based on the presently applicable control parameter set. In otherwords, the HSC applies each set of parameters of a control parameter setX in conjunction with a control law to generate control variables todeliver to, and potentially effectuate a change to, the electricalsystem at appropriate times.

For an electrical system with a controllable battery ESS, this secondtask of the HSC may utilize four parameters for each time segment. Eachof the four parameters may be defined as in Table 1 above. In oneembodiment, these parameters are used by the HSC to control the batteryinverter to charge or discharge the energy storage device. For a batteryESS, the typical rate at which the process variables are read and usedby the HSC and new control variables are generated may be from 10 timesper second to once per 15 minutes. The control variables (or the set ofvalues for the set of control variables) for a given corresponding timesegment may be provided to the electrical system at (e.g., before orduring) the given corresponding time segment of the upcoming timedomain.

As can be appreciated, in other embodiments, an entire control plan(e.g., a control parameter set X comprising a set of sets) may beprocessed by the HSC to determine a plurality of sets of controlvariables, each set of control variables for a corresponding timesegment. The plurality of sets of control variables may be provided atonce (e.g., before the upcoming time domain or no later than during afirst time segment of the upcoming time domain). Or, each set of theplurality of sets may be provided individually to the electrical systemat (e.g., before or during) the given corresponding time segment.

Another aspect of the HSC, according to one embodiment, is that the HSCcan also be used to curtail a generator (such as a photovoltaicgenerator) if necessary to maintain the lower bound on electrical systempower consumption specified by LB.

FIG. 16 is a method 1600 of a dynamic manager, or HSC, according to oneembodiment of the present disclosure, to use a set of optimal controlparameters X_(opt) in conjunction with a control law to determine valuesof a set of control variables to command the electrical system. A set ofoptimal control parameters (X_(opt)), a measurement of unadjustedbuilding load (Load), and PV maximum power (PV_max_power) are receivedor otherwise available as inputs to the method 1600. The dynamic managerprocesses X_(opt) to determine a set of control values to effectuate achange to the electrical system toward meeting an objective foreconomical optimization of the electrical system during an upcoming timedomain. The output control variables are the ESS power command(ESS_command) and the photovoltaic limit (PV_limit), which are output tothe building electrical system to command an ESS and a photovoltaicsubsystem.

The presently applicable P_(nom), UB, UB₀, and LB are extracted 1602from X_(opt). The ESS power command, ESS_command, is set 1604 equal toP_(nom). The photovoltaic limit, PV_limit, is set 1606 equal to PVmaximum power, PV_max_power. The building power, P_building, iscalculated 1608 as a summation of the unadjusted building load, thephotovoltaic limit, and the ESS power command(P_building=Load+PV_limit+ESS_command).

A determination 1610 is made whether the building power is greater thanUB₀(P_building>UB₀) and whether the ESS command is greater than zero(ESS_command>0). If yes, then variables are set 1612 as:ESS_command=UB₀−Load−PV_limitP_building=Load+PV_limit+ESS_command.

A determination 1614 is made whether building power is greater than UB(P_building>UB). If yes, then variables are set 1616 as:ESS_command=UB−Load−PV_limitP_building=Load+PV_limit+ESS_command.

A determination 1618 is made whether building power is less than LB(P_building<LB). If yes, then variables are set 1620 as:ESS_command=LB−Load−PV_limitP_building=Load+PV_limit+ESS_command,and another determination 1622 is made whether building power remainsless than LB (P_building<LB). If yes, then the photovoltaic limitPV_limit is set 1624 as:PV_limit+(LB−P_building).Then the control variables ESS_command and PV_limit are output 1630 tothe electrical system.

An Example HSC Result

FIG. 17 is a graph 1700 showing plots for an example of application of aparticular four-parameter control set during a time segment. The graph1700 shows a value for each of UB, UB₀, LB, and P_(nom), which aredefined above in Table 1. A vertical axis is the power consumption (orrate of energy consumed), with negative values being generative. A firstplot 1702 provides unadjusted values of power consumption (kW) for theelectrical system load plus renewable (photovoltaic) generation andexcluding battery operation, over the time segment. In other words, thefirst plot 1702 shows operation of the electrical system without benefitof a controllable ESS (battery) that is controlled by a controller,according to the present disclosure. A second plot 1704 provides valuesof power consumption (kW) for battery operation over the time segment.The second plot 1704 may reflect operation of an ESS as commanded by thecontroller. In other words, the second plot 1704 is the control variablefor the ESS. The battery operation value may be the value of the controlvariable to be provided by the HSC to command operation of the ESS. Athird plot 1706 provides values of power consumption (kW) for theelectrical system load plus renewable (photovoltaic) generation andincluding battery operation, over the time segment. The third plot 1706illustrates how the controlled ESS (or battery) affects the powerconsumption of the electrical system from the grid. Specifically, thebattery in this example is controlled (e.g., by the battery operationvalue) to discharge to reduce the load of the electrical system on thegrid and limit peak demand to the UB value when desired. Furthermore,this example shows LB being enforced by commanding the ESS to charge byan amount that limits the adjusted net power to be no less than LB whennecessary. Furthermore, this example shows that the nominal ESS power(Pnom) is commanded to the extent possible while still meeting therequirements of UB, UB₀, and LB.

In other embodiments, the control parameter set X may have fewer or moreparameters than the four described for the example embodiment above. Forexample, the control parameter set X may be comprised of only threeparameters: Pnom, UB, and LB. Alternately, the control parameter set Xmay be comprised of only two parameters: Pnom and UB. Alternately, thecontrol parameter set X may include only of UB or only of Pnom. Or, itmay include any other combination of four or fewer parameters from theabove list.

Battery Models

In a battery ESS, battery cost can be a significant fraction of theoverall system cost and in many instances can be greater than 60% of thecost of the system. The cost of the battery per year is roughlyproportional to the initial cost of the battery and inverselyproportional to the lifetime of the battery. Also, any estimated costsof system downtime during replacement of a spent battery may be takeninto account. A battery's condition, lifetime, and/or state of health(SoH) may be modeled and/or determined by its degradation rate (or rateof reduction of capacity and its capacity at end of life). A battery'sdegradation rate can be dependent upon many factors, including time,SoC, discharge or charge rate, energy throughput, and temperature of thebattery. The degradation rate may consider capacity of the battery (orloss thereof). Other ways that a battery's condition, lifetime, and/orSoH may be evaluated may be based on a maximum discharge current of thebattery or the series resistance of the battery.

Described herein are battery models based on battery degradation as afunction of battery capacity as compared to initial capacity or capacityat the beginning of life of the battery. Stated otherwise, the disclosedbattery models consider battery condition or state of health accordingto the battery capacity lost from the capacity at the beginning of lifeof the battery. As can be appreciated, other battery models may modelbattery condition according to another way, such as maximum dischargecurrent of the battery, the series resistance of the battery, or thelike.

In one embodiment, the battery degradation and its associated cost isincluded as a cost element in the cost function. By including batterydegradation cost in the cost function, as the EO executes to find theminimum cost, the EO can effectively consider the contribution ofbattery degradation cost for each possible control parameter set X. Inother words, the EO can take into account a battery degradation costwhen determining (e.g., from a continuum of infinite controlpossibilities) an optimal control parameter set X_(opt). To accomplishthis, a parameterized model of battery performance, especially itsdegradation rate, can be developed and used in the cost function duringthe simulation of potential control solutions (e.g., sets of controlparameters X). The battery parameters (or constants) for any batterytype can be determined that provide a closest fit (or sufficiently closefit within a prescribed tolerance) between the model and the actualbattery performance or degradation. Once the parameters are determined,the cost function can be initialized with configuration informationcontaining those parameters so that it is able to use the model in itscontrol simulation in some implementations.

In one embodiment, battery degradation is written in the form of a timeor SoC derivative that can be integrated numerically as part of the costfunction control simulation to yield battery degradation during thefuture time domain. In one embodiment, this degradation derivative canbe comprised of two components: a wear component (or throughputcomponent) and an aging component. The components can be numericallyintegrated vs. time using an estimate of the battery SoC at each timestep in one embodiment.

Examples of components of a battery degradation model, according to oneembodiment, that meet these criteria are illustrated by FIGS. 18 and 19.FIG. 18 shows the relationship of wear rate versus SoC for a lead acidbattery, based on a battery degradation model that includes wear. FIG.19 shows a relationship between SoC and aging rate (or aging factor) fora lead acid battery, based on a battery model that includes aging.Battery models that combine both wear and aging can then be fit to matcha specific battery's cycle life similar to FIG. 20.

Formulating the battery degradation model as a time or SoC derivative isalso beneficial because the model can be used to calculate batterydegradation for any arbitrary battery operation profile. (A batteryoperation profile is a battery's SoC vs. time.) Calculating batterydegradation is useful in simulation of the performance (both physicaland economic) of a battery ESS. After a simulation produces a batteryoperation profile, the derivative-based degradation model can beintegrated numerically over that profile to produce an accurate estimateof the battery degradation in one embodiment.

Other common degradation or “lifetime” models only provide degradationbased on the number of cycles in the profile. With those models, thedefinition of a “cycle” is problematic, inconsistent, and difficult touse computationally for an arbitrary battery operation profile.

Note that other embodiments of wear and aging models, and theircombinations, can be used in addition to those shown and describedherein. For those other models, if the models are expressible asderivatives (and/or partial derivatives) with respect to time or withrespect to battery SoC, they will also be afforded the advantagesalready mentioned and will be readily usable as a cost element in a costfunction of an EO.

The graphs of FIGS. 18 and 19 illustrate different components of abattery degradation model, according to one embodiment of the presentdisclosure. The battery degradation model of the illustrated example maymodel a lead-acid battery and may include a wear component and an agingcomponent. The wear component may include a function of the rate ofcharge or discharge of the battery, the SoC of the battery, and thetemperature of the battery. The aging component may include a functionof the battery state including the SoC of the battery and a temperatureof the battery.

Consider one measure of a battery condition, a measure of batterydegradation C_(ƒ), which is the maximum battery capacity divided by themaximum battery capacity at beginning of life (BoL). At BoL, C_(ƒ)=1.0.As the battery degrades, C_(ƒ) decreases. At end of life (EoL),C_(ƒ)=C_(ƒ,EoL). C_(ƒ,EoL) is typically between 0.5 and 0.9 and oftenaround 0.8. In some embodiments of present disclosure, changes in C_(ƒ)can be used to estimate the cost of operating the battery (e.g., batterydegradation cost) during that future time domain as:BatteryCost_(t) ₁ _(. . . t) ₂ =BatteryCost_(total)*(C _(ƒ,t1) −C_(ƒ,t2))/(1−C _(ƒ,EOL))where BatteryCost_(total) is a total battery cost (for example aninitial or net present cost), and C_(ƒ,t1)−C_(ƒ,t2) is the change inC_(ƒ) between time t₁ and t₂. In other words, C_(ƒ,t1)−C_(ƒ,t2) is ameasure of degradation of the battery between times t₁ and t₂. Thebattery lifetime is that point at which C_(ƒ) reaches C_(ƒ,EoL), whichis the manufacturer's failure limit (usually 0.8 or 80% of initialmaximum capacity).

Determining the battery degradation cost for a time period may includemultiplying the change in C_(ƒ) by a cost factor. The cost factor may bethe total cost of the battery divided by the total decrease in C_(ƒ) atend of life, BatteryCost_(total)/(1−C_(ƒ,EOL)). In other words, the costfactor may be determined as a lifetime cost of the battery divided bythe amount of battery degradation resulting in end of life of thebattery.

To determine the change in C_(ƒ) between times t₁ and t₂, two components(wear and aging) can be considered as two partial derivatives of C_(ƒ)with respect to SoC and t respectively. A battery's capacity changeduring some future time domain from t=t₁ to t=t₂ can be determined usingcalculus as:

${{C_{f,{t\; 1}} - C_{f,{t\; 2}}} = {- {\int_{t = t_{1}}^{t = t_{2}}{\left\lbrack {{\frac{\partial C_{f}}{\partial{SoC}}\frac{dSoC}{dt}} + \frac{\partial C_{f}}{\partial t}} \right\rbrack{dt}}}}},$where the rate of change of C_(ƒ) due to wear (throughput), the “wearrate,” is denoted

$\frac{\partial C_{f}}{\partial{SoC}},$the rate of change of C_(ƒ) due to aging, the “aging rate,” is denoted

$\frac{\partial C_{f}}{\partial t},$and the rate of change of state of charge (denoted “SoC” and rangingfrom 0 to 1) versus time is denoted

$\frac{dSoC}{dt}.$This equation may be integrated numerically using many commonly knownmethods including the trapezoidal rule. The derivative

$\frac{dSoC}{dt}$can be obtained from the simulation performed by the cost function, andcan be calculated as a discretized value

$\frac{\Delta\;{SoC}}{\Delta\; t}.$

Regarding the rate of change of C_(ƒ) due to wear, an exponential modelcan be used that depends upon whether the battery is discharging,

${\frac{dSoC}{dt} < 0},$or charging,

$\frac{dSoC}{dt} \geq 0.$For example, the wear rate can be expressed as,

$\frac{\partial C_{f}}{\partial{SoC}} = \left\{ {\begin{matrix}{{{- A}*e^{- {BSoC}}} - E} & {\frac{dSoC}{dt} < 0} \\{{{- C}*e^{D{({{SoC} - 1})}}} - F} & {\frac{dSoC}{dt} \geq 0}\end{matrix},} \right.$where A and B specify the rate of increase in degradation duringdischarging, E represents the baseline degradation during discharging, Cand D specify the rate of increase in degradation during charging, and Frepresents the baseline degradation during charging.

FIG. 18 is a graph 1800 of the exponential battery wear model for aspecific battery degradation model, according to one embodiment of thepresent disclosure. FIG. 18 provides plots 1802, 1804 of the negative ofthe “wear rate,”

${\frac{\partial C_{f,{loss}}}{\partial{SoC}} = {- \frac{\partial C_{f}}{\partial{SoC}}}},$versus SoC. Put another way, plots 1802 and 1804 represent the rate ofbattery capacity loss versus a change in the state of charge of thebattery. A vertical axis of the graph 1800 shows the negative of thewear rate in dimensionless units. A horizontal axis of the graph 1800shows a battery SoC, where 1.0=100% (fully charged state). One plot 1802shows the negative of the wear rate during charging, and a second plot1804 shows the negative of the wear rate during discharging. The plots1802, 1804 are computed using the above corresponding equations withparameters (A through F) selected specifically to match a type oflead-acid battery. The parameters in this case are A=4e-3, B=5.63,C=9e-4, D=27.4, E=3e-5, and F=3e-5.

Regarding the rate of change of C_(ƒ) due to aging, an exponential modelfor the rate of change in fractional capacity versus time can be used.For example, the aging rate can be expressed as,

${\frac{\partial C_{f}}{\partial t} = {{{- G}*\left\lbrack {{Aging}\mspace{14mu}{Factor}} \right\rbrack} = {{- G}*\left\lbrack {\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1}}{K}}}} \right)} \right\rbrack}}},$where G represents the nominal aging rate in units of fractionalcapacity lost (e.g., 2% per year) versus time. The Aging Factor, whenmultiplied by the nominal aging rate G and by −1, gives the aging rate.A 1.0 aging factor indicates the aging rate is at −G. Also, H and Idefine the rate of increase in aging rate as SoC approaches 0, and J andK define the rate of increase in aging rate as the SoC approaches 1.

FIG. 19 is a graph 1900 providing a plot 1902 showing a relationshipbetween Aging Factor and SoC for a specific battery degradation model,according to one embodiment of the present disclosure. The vertical axisof the graph 1900 shows an Aging Factor. The horizontal axis of thegraph 1900 shows the SoC of the battery being modeled. The plot 1902reflects the values for the Aging Factor

$\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K\;}}}} \right)$where in this example the aging parameters are H=15.0, I=0.2, J=2.5, andK=0.02.

As noted above, a cost function, according to one embodiment, may summultiple cost elements for operation of an electrical system, includingthe cost element BatteryCost_(t1 . . . t2), orBatteryCost_(t1 . . . t2)*24 hr/(t₂−t₁) in embodiments where the costfunction determines a cost per day and t₉ and t₂ have units of hours.

The model explained above can also be described in terms of capacitylost C_(ƒ,lost). The model includes both capacity lost due to batterywear (throughput), C_(ƒ,lost,wear), and capacity lost due to batteryaging, C_(ƒ,lost,aging). In other words, capacity lost can be expressedas:C _(ƒ,lost) =C _(ƒ,lost,wear) +C _(ƒ,lost,aging).

The battery end of life is that point at which C_(ƒ,lost) reaches 1minus the manufacturer's failure limit (usually 0.2 or 20% of initialcapacity, which again sets a failure point at 80% of original capacity).

Capacity lost due to battery wear (throughput), C_(ƒ,lost,wear), can bemodeled with an exponential model for the rate of change in C_(ƒ,lost)versus SoC. For example, a discharge formulation of the loss offractional capacity per unit change in fractional SoC applicable duringa decreasing SoC can be expressed as,

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\;\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$and a charge formulation of the loss of fractional capacity per unitchange in fractional SoC applicable during an increasing SoC can beexpressed as,

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{11mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + {F.}}$As before, SoC is the state of charge of the battery, A and B specifythe rate of increase in degradation during discharging, E represents thebaseline degradation during discharging, C and D specify the rate ofincrease in degradation during charging, and F represents the baselinedegradation during charging. As noted previously, the graph 1800 of FIG.18 provides plots 1802, 1804 of

$\frac{\partial C_{f,{lost}}}{\partial{SoC}}$vs. SoC for this specific battery degradation model.

For a given battery SoC profile, the total capacity loss due to wear,C_(ƒ,lost,wear), between times t₁ and t₂ can be calculated with:

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}} = \left\{ {{\begin{matrix}{{{- \frac{\partial C_{f,{lost}}}{\partial{SoC}}}\mspace{14mu}{\,_{discharge}\frac{dSoC}{dt}}\frac{dSoC}{dt}} < 0} \\{{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}{\,_{charge}\frac{dSoC}{dt}}\mspace{31mu}\frac{dSoC}{dt}} \geq 0}\end{matrix}C_{f,{lost},{wear}}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}} \right.$

Capacity lost due to battery aging, C_(ƒ,lost,aging), can be representeddifferentially by defining the rate of battery capacity loss versustime, or more specifically in one embodiment, the rate of change infractional capacity lost versus time. In one example, this differentialrepresentation of battery capacity loss can take an exponential form as,

${\frac{\partial C_{f,{lost}}}{\partial t} = {{G*\left\lbrack {{Aging}\mspace{14mu}{Factor}} \right\rbrack} = {G*\left\lbrack {\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)} \right\rbrack}}},$where, as before, G represents the nominal aging rate in units offractional capacity lost (e.g., 2% per year) versus time. The AgingFactor, when multiplied by the nominal aging rate G and by −1, gives theaging rate. A 1.0 aging factor indicates the aging rate is at −G. Also,H and I define the rate of increase in aging rate as SoC approaches 0,and J and K define the rate of increase in aging rate as the SoCapproaches 1.

For a given battery SoC profile, the total battery capacity loss due toaging, C_(ƒ,lost,aging), between times t₁ and t₂ can be calculated with:

$C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}$

As noted previously, the graph 1900 of FIG. 19 provides a plot 1902showing a relationship between SoC and aging rate (or an aging factor)for this specific battery degradation model.

Combining the two components (wear and aging) from the previousexamples, a battery's capacity lost during some future time domain fromt=t₁ to t₂ can be determined as:

$C_{f,{lost}} = {{C_{f,{lost},{wear}} + C_{f,{lost},{aging}}} = {{{\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}} + {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}} = {\int_{t = t_{1}}^{t = t_{2}}{\left\lbrack {{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}} + \frac{\partial C_{f,{lost}}}{\partial t}} \right\rbrack{dt}}}}}$

Once the battery capacity lost is determined over the future time domainby numerically integrating the above equation, the cost of operating thebattery (e.g., a battery degradation cost) during that future timedomain can be calculated as:

${{BatteryCost}_{t_{1}\ldots\; t_{2}} = {{BatteryCost}_{total}*\frac{C_{f,{lost}}}{\left( {1 - C_{f,{EOL}}} \right)}}},$where BatteryCost_(t1 . . . t2) is the cost of operating the batteryduring the future time domain between a first time t₁ to a second timet₂, BatteryCost_(total) is a total battery cost (for example an initialor net present cost), C_(ƒ,lost) is the battery capacity lost, andC_(ƒ,EoL) is the fractional battery capacity remaining at end of life.Stated otherwise, determining the battery degradation cost for a timeperiod comprises multiplying the total battery degradation for the timeperiod by a cost factor. The cost factor may be the total cost of thebattery divided by the total fractional capacity loss during thebattery's lifetime, BatteryCost_(total)/(1−C_(ƒ,EOL)). In other words,the cost factor may be determined as a lifetime cost of the batterydivided by the amount of battery degradation resulting in end of life ofthe battery.

Using the combined wear and aging model described above, coefficientscan be found that result in a fit to a battery manufacturer's cyclelife.

FIG. 20 is a pair of graphs 2010, 2020 that illustrate a battery'slifetime. Graph 2010 shows the manufacturer's data 2012 for batterycycle life (number of cycles) versus depth of discharge under continuouscycling conditions. Graph 2020 shows the manufacturer's data 2022 forbattery lifetime (in years) versus depth of discharge assuming one cycleper day. The coefficients determined to match the data of thismanufacturer's cycle life for the example battery may be:

-   -   A=4e-3, B=5.63, C=9e-4, D=27.4, E=3e-5, F=3e-5, G=1.95e-6 hr⁻¹,        H=15.0, I=0.2, J=2.5, and K=0.02.        Graph 2010 includes a plot 2014 of the model with the above        coefficients aligning with the manufacturer's data 2012 and        providing a projected battery cycle life versus depth of        discharge. Graph 2020 includes a plot 2024 of the model with the        above coefficients aligning with the manufacturer's data 2022        and providing projected battery lifetime versus depth of        discharge.

As can be appreciated, different coefficients and/or different batterydegradation models may be used, depending on a type of battery deployedin an ESS, according to the present disclosure.

Other battery models may be used to estimate Coulombic and Ohmicefficiency or the maximum rates of charge and discharge. Similar to thedegradation model described above, the efficiency and maximum charge anddischarge rates may be parameterized with constants that achieve asubstantial “fit” between the model and the expected batteryperformance. Once these battery performance models are defined andparameters are provided, they may be used in the cost function controlsimulation to better predict the outcome of application of variouscontrol parameter sets.

Apparatus Architectures

FIG. 21 is a diagram of an EO 2100 according to one embodiment of thepresent disclosure. The EO 2100 may determine a control plan formanaging control of an electrical system 2118 during an upcoming timedomain and provide the control plan as output. The determined controlplan may include a plurality of sets of parameters each to be appliedfor a different time segment within an upcoming time domain. The EO 2100may determine the control plan based on a set of configuration elementsspecifying one or more constraints of the electrical system 2118 anddefining one or more cost elements associated with operation of theelectrical system. The EO 2100 may also determine the control plan basedon a set of process variables that provide one or more measurements of astate of the electrical system 2118. The EO 2100 may include one or moreprocessors 2102, memory 2104, an input/output interface 2106, anetwork/COM interface 2108, and a system bus 2110.

The one or more processors 2102 may include one or more general purposedevices, such as an Intel®, AMD®, or other standard microprocessor. Theone or more processors 2102 may include a special purpose processingdevice, such as ASIC, SoC, SiP, FPGA, PAL, PLA, FPLA, PLD, or othercustomized or programmable device. The one or more processors 2102perform distributed (e.g., parallel) processing to execute or otherwiseimplement functionalities of the present embodiments. The one or moreprocessors 2102 may run a standard operating system and perform standardoperating system functions. It is recognized that any standard operatingsystems may be used, such as, for example, Microsoft® Windows®, Apple®MacOS®, Disk Operating System (DOS), UNIX, IRJX, Solaris, SunOS,FreeBSD, Linux®, ffiM® OS/2® operating systems, and so forth.

The memory 2104 may include static RAM, dynamic RAM, flash memory, oneor more flip-flops, ROM, CD-ROM, DVD, disk, tape, or magnetic, optical,or other computer storage medium. The memory 2104 may include aplurality of program modules 2120 and a data 2140.

The program modules 2120 may include all or portions of other elementsof the EO 2100. The program modules 2120 may run multiple operationsconcurrently or in parallel by or on the one or more processors 2102. Insome embodiments, portions of the disclosed modules, components, and/orfacilities are embodied as executable instructions embodied in hardwareor in firmware, or stored on a non-transitory, machine-readable storagemedium. The instructions may comprise computer program code that, whenexecuted by a processor and/or computing device, cause a computingsystem to implement certain processing steps, procedures, and/oroperations, as disclosed herein. The modules, components, and/orfacilities disclosed herein may be implemented and/or embodied as adriver, a library, an interface, an API, FPGA configuration data,firmware (e.g., stored on an EEPROM), and/or the like. In someembodiments, portions of the modules, components, and/or facilitiesdisclosed herein are embodied as machine components, such as generaland/or application-specific devices, including, but not limited to:circuits, integrated circuits, processing components, interfacecomponents, hardware controller(s), storage controller(s), programmablehardware, FPGAs, ASICs, and/or the like. Accordingly, the modulesdisclosed herein may be referred to as controllers, layers, services,engines, facilities, drivers, circuits, subsystems and/or the like.

The system memory 2104 may also include the data 2140. Data generated bythe EO 2100, such as by the program modules 2120 or other modules, maybe stored on the system memory 2104, for example, as stored program data2140. The data 2140 may be organized as one or more databases.

The input/output interface 2106 may facilitate interfacing with one ormore input devices and/or one or more output devices. The inputdevice(s) may include a keyboard, mouse, touch screen, light pen,tablet, microphone, sensor, or other hardware with accompanying firmwareand/or software. The output device(s) may include a monitor or otherdisplay, printer, speech or text synthesizer, switch, signal line, orother hardware with accompanying firmware and/or software.

The network/COM interface 2108 may facilitate communication or otherinteraction with other computing devices (e.g., a dynamic manager 2114)and/or networks 2112, such as the Internet and/or other computing and/orcommunications networks. The network/COM interface 2108 may be equippedwith conventional network connectivity, such as, for example, Ethernet(IEEE 802.3), Token Ring (IEEE 802.5), Fiber Distributed DatalinkInterface (FDDI), or Asynchronous Transfer Mode (ATM). Further, thenetwork/COM interface 2108 may be configured to support a variety ofnetwork protocols such as, for example, Internet Protocol (IP), TransferControl Protocol (TCP), Network File System over UDP/TCP, Server MessageBlock (SMB), Microsoft® Common Internet File System (CIFS), HypertextTransfer Protocols (HTTP), Direct Access File System (DAFS), FileTransfer Protocol (FTP), Real-Time Publish Subscribe (RTPS), OpenSystems Interconnection (OSI) protocols, Simple Mail Transfer Protocol(SMTP), Secure Shell (SSH), Secure Socket Layer (SSL), and so forth. Thenetwork/COM interface 2108 may be any appropriate communicationinterface for communicating with other systems and/or devices.

The system bus 2110 may facilitate communication and/or interactionbetween the other components of the system, including the one or moreprocessors 2102, the memory 2104, the input/output interface 2106, andthe network/COM interface 2108.

The modules 2120 may include a historic load shape learner 2122, a loadpredictor 2124, a control parameter definer 2126, a cost functionpreparer/initializer 2128, a cost function evaluator 2130, and anoptimizer 2132.

The historic load shape learner 2122 may compile or otherwise gatherhistoric trends to determine a historic profile or an average load shapethat may be used for load prediction. The historic load shape learner2122 may determine and update and an avg_load_shape array and anavg_load_shape_time_of day array by recording load observations andusing an approach to determine a suitable average of the historic loadobservations after multiple periods of time. The historic load shapelearner 2122 may utilize a process or an approach to determining thehistoric average profile such as described above with reference to FIG.8.

The load predictor 2124 may predict a load on the electrical system 2118during an upcoming time domain. The load predictor 2124 may utilize ahistoric profile or historic load observations provided by the historicload shape learner 2122. The load predictor 2124 may utilize a loadprediction method such as described above with reference to FIGS. 7 and8.

The control parameter definer 2126 may generate, create, or otherwisedefine a control parameter set X, in accordance with a control law. Thecreated control parameters 2150 may include a definition 2152 and avalue 2154 and may be stored as data 2140.

The cost function preparer/initializer 2128 prepares or otherwiseobtains a cost function to operate on the control parameter set X. Thecost function may include the one or more constraints and the one ormore cost elements associated with operation of the electrical system2118. The cost function preparer/initializer 2128 pre-calculates certainvalues that may be used during iterative evaluation of the cost functioninvolved with optimization.

The cost function evaluator 2130 evaluates the cost function based onthe control parameter set X. Evaluating the cost function simulatesoperation of the electrical system for a given time period under a givenset of circumstances set forth in the control parameter set X andreturns a cost of operating the electrical system during the given timeperiod.

The optimizer 2128 may execute a minimization of the cost function byutilizing an optimization algorithm to find the set of values for theset of control variables. Optimization (e.g., minimization) of the costfunction may include iteratively utilizing the cost function evaluator2130 to evaluate the cost function with different sets of values for acontrol parameter set X until a minimum cost is determined. In otherwords, the algorithm may iteratively change values for the controlparameter set X to identify an optimal set of values in accordance withone or more constraints and one or more cost elements associated withoperation of the electrical system.

The data 2140 may include configuration data 2142, external data 2144,process variables 2146, state data 2147, historic observations 2148, andcontrol parameters 2150 (including definitions 2152 and values 2154).

The configuration data 2142 may be provided to, and received by, the EO2100 to communicate constraints and characteristics of the electricalsystem 2118.

The external data 2144 may be received as external input (e.g., weatherreports, changing tariffs, fuel costs, event data), which may inform thedetermination of the optimal set of values.

The process variables 2146 may be received as feedback from theelectrical system 2118. The process variables 2146 are typicallymeasurements of the electrical system 2118 state and are used to, amongother things, determine how well objectives of controlling theelectrical system 2118 are being met.

The state data 2147 would be any EO state information that may behelpful to be retained between one EO iteration and the next. An exampleis avg_load_shape.

The historic observations 2148 are the record of process variables thathave been received. A good example is the set of historic loadobservations that may be useful in a load predictor algorithm.

As noted earlier, the control parameter definer may create controlparameters 2150, which may include a definition 2152 and a value 2154and may be stored as data 2140. The cost function evaluator 2130 and/orthe optimizer 2132 can determine values 2154 for the control parameters2150.

The EO 2100 may provide one or more control parameters 2150 as a controlparameter set X to the dynamic manager 2114 via the network/COMinterface 2108 and/or via the network 2112. The dynamic manager 2114 maythen utilize the control parameter set X to determine values for a setof control variables to deliver to the electrical system 2118 toeffectuate a change to the electrical system 2118 toward meeting one ormore objectives (e.g., economic optimization) for controlling theelectrical system 2118.

In other embodiments, the EO 2100 may communicate the control parameterset X directly to the electrical system 2118 via the network/COMinterface 2108 and/or via the network 2112. In such embodiments, theelectrical system 2118 may process the control parameter set X directlyto determine control commands, and the dynamic manager 2114 may not beincluded.

In still other embodiments, the EO 2100 may determine values for a setof control variables (rather than for a control parameter set X) and maycommunicate the set of values for the control variables directly to theelectrical system 2118 via the network/COM interface 2108 and/or via thenetwork 2112.

One or more client computing devices 2116 may be coupled via the network2112 and may be used to configure, provide inputs, or the like to the EO2100, the dynamic manager 2114, and/or the electrical system 2118.

FIG. 22 is a diagram of a dynamic manager 2200, according to oneembodiment of the present disclosure. The dynamic manager 2200,according to one embodiment of the present disclosure, is a secondcomputing device that is separate from an EO 2215, which may be similarto the EO 2100 of FIG. 21. The dynamic manager 2200 may operate based oninput (e.g., a control parameter set X) received from the EO 2215. Thedynamic manager 2200 may determine a set of control values for a set ofcontrol variables for a given time segment of the upcoming time domainand provide the set of control values to an electrical system 2218 toeffectuate a change to the electrical system 2218 toward meeting anobjective (e.g., economical optimization) of the electrical system 2218during an upcoming time domain. The dynamic manager 2200 determines theset of control values based on a control law and a set of values for agiven control parameter set X. The dynamic manager 2200 may include oneor more processors 2202, memory 2204, an input/output interface 2206, anetwork/COM interface 2208, and a system bus 2210.

The one or more processors 2202 may include one or more general purposedevices, such as an Intel®, AMD®, or other standard microprocessor. Theone or more processors 2202 may include a special purpose processingdevice, such as ASIC, SoC, SiP, FPGA, PAL, PLA, FPLA, PLD, or othercustomized or programmable device. The one or more processors 2202perform distributed (e.g., parallel) processing to execute or otherwiseimplement functionalities of the present embodiments. The one or moreprocessors 2202 may run a standard operating system and perform standardoperating system functions. It is recognized that any standard operatingsystems may be used, such as, for example, Microsoft® Windows®, Apple®MacOS®, Disk Operating System (DOS), UNIX, IRJX, Solaris, SunOS,FreeBSD, Linux®, ffiM® OS/2® operating systems, and so forth.

The memory 2204 may include static RAM, dynamic RAM, flash memory, oneor more flip-flops, ROM, CD-ROM, DVD, disk, tape, or magnetic, optical,or other computer storage medium. The memory 2204 may include aplurality of program modules 2220 and a program data 2240.

The program modules 2220 may include all or portions of other elementsof the dynamic manager 2200. The program modules 2220 may run multipleoperations concurrently or in parallel by or on the one or moreprocessors 2202. In some embodiments, portions of the disclosed modules,components, and/or facilities are embodied as executable instructionsembodied in hardware or in firmware, or stored on a non-transitory,machine-readable storage medium. The instructions may comprise computerprogram code that, when executed by a processor and/or computing device,cause a computing system to implement certain processing steps,procedures, and/or operations, as disclosed herein. The modules,components, and/or facilities disclosed herein may be implemented and/orembodied as a driver, a library, an interface, an API, FPGAconfiguration data, firmware (e.g., stored on an EEPROM), and/or thelike. In some embodiments, portions of the modules, components, and/orfacilities disclosed herein are embodied as machine components, such asgeneral and/or application-specific devices, including, but not limitedto: circuits, integrated circuits, processing components, interfacecomponents, hardware controller(s), storage controller(s), programmablehardware, FPGAs, ASICs, and/or the like. Accordingly, the modulesdisclosed herein may be referred to as controllers, layers, services,engines, facilities, drivers, circuits, and/or the like.

The system memory 2204 may also include data 2240. Data generated by thedynamic manager 2200, such as by the program modules 2220 or othermodules, may be stored on the system memory 2204, for example, as storedprogram data 2240. The stored program data 2240 may be organized as oneor more databases.

The input/output interface 2206 may facilitate interfacing with one ormore input devices and/or one or more output devices. The inputdevice(s) may include a keyboard, mouse, touch screen, light pen,tablet, microphone, sensor, or other hardware with accompanying firmwareand/or software. The output device(s) may include a monitor or otherdisplay, printer, speech or text synthesizer, switch, signal line, orother hardware with accompanying firmware and/or software.

The network/COM interface 2208 may facilitate communication with othercomputing devices and/or networks 2212, such as the Internet and/orother computing and/or communications networks. The network/COMinterface 2208 may couple (e.g., electrically couple) to a communicationpath (e.g., direct or via the network) to the electrical system 2218.The network/COM interface 2208 may be equipped with conventional networkconnectivity, such as, for example, Ethernet (IEEE 802.3), Token Ring(IEEE 802.5), Fiber Distributed Datalink Interface (FDDI), orAsynchronous Transfer Mode (ATM). Further, the network/COM interface2208 may be configured to support a variety of network protocols suchas, for example, Internet Protocol (IP), Transfer Control Protocol(TCP), Network File System over UDP/TCP, Server Message Block (SMB),Microsoft® Common Internet File System (CIFS), Hypertext TransferProtocols (HTTP), Direct Access File System (DAFS), File TransferProtocol (FTP), Real-Time Publish Subscribe (RTPS), Open SystemsInterconnection (OSI) protocols, Simple Mail Transfer Protocol (SMTP),Secure Shell (SSH), Secure Socket Layer (SSL), and so forth.

The system bus 2210 may facilitate communication and/or interactionbetween the other components of the system, including the one or moreprocessors 2202, the memory 2204, the input/output interface 2206, andthe network/COM interface 2208.

The modules 2220 may include a parameter selector 2222 and a control lawapplicator 2224.

The parameter selector may pick which set of parameters to be used fromthe control parameter set X, according to a given time segment.

The control law applicator 2224 may process the selected set ofparameters from the control parameter set X and convert or translate theindividual set of parameters into control variables (or values thereof).The control law applicator 2224 may apply logic and/or a translationprocess to determine a set of values for a set of control variablesbased on a given set of parameters (from a control parameter set X) fora corresponding time segment. For example, the control law applicator2224 may apply a method and/or logic as shown in FIG. 16.

The data 2240 may include configuration data 2242, process variables2246, control parameters 2250 (including definitions 2252 and values2254), and/or control variables 2260 (including definitions 2262 andvalues 2264).

The configuration data 2242 may be provided to, and received by, thedynamic manager 2200 to communicate constraints and characteristics ofthe electrical system 2118.

The process variables 2246 may be received as feedback from theelectrical system 2218. The process variables 2246 are typicallymeasurements of the electrical system 2218 state and are used to, amongother things, determine how well objectives of controlling theelectrical system 2218 are being met. Historic process variables 2246may be utilized by the HSL for example to calculate demand which may becalculated as average building power over the previous 15 or 30 minutes.The dynamic manager 2200 can determine the set of control values for theset of control variables based on the process variables 2246.

The control parameters 2250 may comprise a control parameter set X thatincludes one or more sets of parameters each for a corresponding timesegment of an upcoming time domain. The control parameters 2250 mayadditionally, or alternately, provide a control plan for the upcomingtime domain. The control parameters 2250 may be received from an EO 2215as an optimal control parameter set X_(opt).

The control variables 2260 may be generated by the parameter interpreter2222 based on an optimal control parameter set X_(opt).

The dynamic manager 2200 may receive the optimal control parameter setX_(opt) from the EO 2215 via the network/COM interface 2208 and/or viathe network 2212. The dynamic manager 2200 may also receive the processvariables from the electrical system 2218 via the network/COM interface2208 and/or via the network 2212.

The dynamic manager 2200 may provide the values for the set of controlvariables to the electrical system 2218 via the network/COM interface2208 and/or via the network 2212.

One or more client computing devices 2216 may be coupled via the network2212 and may be used to configure, provide inputs, or the like to the EO2215, the dynamic manager 2200, and/or the electrical system 2218.

Example Cases of Energy Costs

FIG. 23 is a graph 2300 illustrating how Time-of-Use (ToU) supplycharges impact energy costs of a customer. ToU supply charges aretime-specific charges customers pay for electrical energy consumed. Thegraph 2300 includes a plot 2302 of the load and a plot 2304 of aphotovoltaic contribution. The graph 2300 includes a plot 2306 of ToUsupply (or energy) rate. As can be seen in the illustrated example, ToUsupply charges can vary by time of day, day of week, and season (summervs. winter). ToU supply charges are calculated based on the NET energyconsumed during specific meter read intervals (often 15 or 30 minutes).In the illustrated example, the supply rates are as follows:

Peak M-F 2 pm-8 pm $0.39/kWh,

Off-Peak 10p-7 am $0.08/kWh,

Shoulder $0.15/kWh.

In the example, based on the load, the photovoltaic generation, and thesupply rates, the Supply Charge on July 05 is approximately:12.2*0.39+1.6*0.08+4.1*0.15=$5.50.

FIG. 24 is a graph 2400 illustrating how demand charges impact energycosts of a customer. Demand charges are electrical distribution chargesthat customers pay based on their maximum demand (kW) during a specifiedwindow of time. The graph 2400 includes a plot 2402 of the load and aplot 2404 of the demand. The graph 2400 also includes a plot 2406 of thedemand rate. Demand charges are typically calculated monthly but canalso be daily. The maximum is often only taken for certain hours of theday. In the illustrated embodiment, a daily demand rate from 8:00 am to10:00 pm on weekdays is $0.84/kW (daily). The peak demand on May 21 is416 kW. Accordingly, the Demand Charge=416*0.84=$349.

FIG. 25 is a graph 2500 illustrating the challenge of maximizing acustomers' economic returns for a wide range of system configurations,building load profiles, and changing utility tariffs. The graph 2500reflects consideration of a number of factors, including:

ToU Supply Charges (seasonal, hourly, for any number of time windows)

Demand Charges (daily, monthly, for any number of time windows)

Utilization of Renewable Generation (e.g., PV, CHP)

Contracted or Incentive Maneuvers (e.g., DMP and Demand Response)

Minimum Import Constraints

Battery Performance, Degradation Rate, and Cost.

The graph 2500 includes a plot 2501 for building load, a plot 2502 forPV full output, a plot 2503 for PV curtailed output, a plot 2504 forbattery, a plot 2505 for net building demand, a plot 2506 for DMPbattery power target, a plot 2507 for an energy supply rate (x 1000), aplot 2508 for demand rate (x 100), and a plot 2509 for the battery SoC(x 100).

An EO according to one embodiment of the present disclosure optimizesoverall energy economics by blending these factors (and any otherfactors) simultaneously in real time.

EXAMPLE EMBODIMENTS

The following are some example embodiments within the scope of thedisclosure. In order to avoid complexity in providing the disclosure,not all of the examples listed below are separately and explicitlydisclosed as having been contemplated herein as combinable with all ofthe others of the examples listed below and other embodiments disclosedhereinabove. Unless one of ordinary skill in the art would understandthat these examples listed below (and the above disclosed embodiments)are not combinable, it is contemplated within the scope of thedisclosure that such examples and embodiments are combinable.

Example 1

A controller to optimize overall economics of operation of an electricalsystem, the controller comprising a communication interface and one ormore processors. The communication interface is to provide acommunication path with an electrical system, The one or more processorsare to determine a set of control values for a set of control variablesto effectuate a change to the electrical system toward meeting acontroller objective for economical optimization of the electricalsystem during an upcoming time domain, wherein the set of control valuesare determined by the one or more processors utilizing an optimizationalgorithm (e.g., a continuous optimization algorithm) to identify theset of control values in accordance with one or more constraints and oneor more cost elements associated with operation of the electricalsystem. The one or more processors are also to provide the values forthe set of control variables to the electrical system via thecommunication interface.

Example 2

The controller of Example 1, wherein the one or more processors arefurther to receive a set of configuration elements specifying the one ormore constraints of the electrical system and defining the one or morecost elements associated with operation of the electrical system.

Example 3

The controller of Example 1, wherein the one or more processors arefurther to receive, via the communication interface, a set of processvariables that provide one or more measurements of a state of theelectrical system.

Example 4

The controller of Example 1, wherein the one or more processorsdetermine the set of values for the set of control variables by:preparing a cost function to operate on the set of control variables,the cost function including the one or more constraints and the one ormore cost elements associated with operation of the electrical system;and executing a minimization (e.g., a generalized minimization) of avalue of the cost function by utilizing the optimization algorithm tofind the set of values for the set of control variables.

Example 5

The controller of Example 4, wherein the cost function is a summation ofthe one or more cost elements.

Example 6

The controller of Example 4, wherein the cost function is evaluated bysimulating operation of the electrical system with application of theset of control variables over an upcoming simulation time domain.

Example 7

The controller of Example 6, wherein evaluating the cost functioncomprises returning a summation of the one or more cost elementsincurred during the simulated operation of the control system over theupcoming simulation time domain.

Example 8

The controller of claim 1, wherein the one or more cost elements includeone or more of an electricity cost (e.g., an electricity supply charge,an electricity demand charge), a tariff definition, a batterydegradation cost, an incentive associated with operation of theelectrical system, a payment for contracted maneuvers, a value ofreserve energy (e.g., for backup and/or as a function of time), revenuefor demand response opportunities, revenue for ancillary services, acost of local generation, and penalties and revenues associated withdeviation from a prescribed or contracted operating plan.

Example 9

The controller of Example 8, wherein the value of reserve energy is afunction of time.

Example 10

The controller of Example 8, wherein the reserve energy is stored in anelectric vehicle that separable from the electric system.

Example 11

The controller of Example 1, wherein the one or more processors arefurther to receive, via the communication interface, a set of externalinputs providing indication of one or more conditions that are externalto the controller and the electrical system, wherein the one or moreprocessors determine the set of values for the set of control variableswith consideration of the one or more conditions.

Example 12

The controller of Example 1, further comprising predicting one or moreof a load on the electrical system and generation by a local generatorof the electrical system during an upcoming time domain, wherein thedetermining the set of control values for the set of control variablesincludes consideration of the predicted one or more of the predictedload and predicted generation during the upcoming time domain.

Example 13

The controller of Example 1, wherein the optimization algorithm is oneor more of: a continuous optimization algorithm; a constrainedcontinuous optimization algorithm; a generalized continuous optimizationalgorithm; and a multivariable continuous optimization algorithm.

Example 14

The controller of Example 1, wherein the set of control variables is oneof a plurality of control variable sets within a control parameter setX, each of the plurality of control variable sets to be applied to adifferent time segment within an upcoming time domain, the set ofcontrol variables to be applied to a corresponding time segment of theupcoming time domain and each other set of the plurality of controlvariable sets to be applied during a different time segment of theupcoming time domain, wherein the one or more processors are further todetermine a set of values for each control variable set of the controlparameter set X and to provide the set of values for the controlparameter set X to the electrical system via the communicationinterface.

Example 15

The controller of Example 14, wherein each of the plurality of controlvariable sets can be defined differently during each time segment thanothers of the plurality of control variable sets.

Example 16

The controller of Example 14, wherein providing the set of values forthe control parameter set X comprises providing a given set of controlvalues for each of the plurality of sets of control variables of thecontrol parameter set X individually at (e.g., before or during acorresponding time segment of the upcoming time domain).

Example 17

The controller of Example 14, wherein the time segments of the upcomingtime domain are defined such that one or more of supply rate costelements and delivery rate cost elements are constant during each timesegment.

Example 18

The controller of Example 14, wherein the time segments of the upcomingtime domain are defined such that one or more of contracted maneuvers,demand response maneuvers, and ancillary service maneuvers arecontinuous during each time segment.

Example 19

A computer-implemented method of a controller to optimize overalleconomics of operation of an electrical system, the method comprising:receiving at a computing device a set of configuration elementsspecifying one or more constraints of the electrical system and definingone or more cost elements associated with operation of the electricalsystem; receiving at a computing device a set of process variables thatprovide one or more measurements of a state of the electrical system,the set of process variables to be used by the controller to determineprogress toward meeting a controller objective for economicaloptimization of the electrical system; determining on a computing devicea set of control values for a set of control variables to provide to theelectrical system to effectuate a change to the electrical system towardmeeting the controller objective for economical optimization of theelectrical system (e.g., during an upcoming time domain), thedetermining the set of control values including utilization of anoptimization algorithm to identify the set of control values inaccordance with the one or more constraints and the one or more costelements; providing the set of control values for the set of controlvariables to the electrical system.

Example 20

The method of Example 19, wherein determining the set of values for theset of control variables comprises: preparing a cost function to operateon the set of control variables, the cost function including the one ormore constraints and the one or more cost elements associated withoperation of the electrical system; and executing a minimization (e.g.,a generalized minimization) of the cost function (e.g., a valueresulting from the cost function) by utilizing the optimizationalgorithm to find the set of values for the set of control variables.

Example 21

The method of Example 20, wherein the optimization algorithm comprises acontinuous optimization algorithm.

Example 22

The method of Example 21, wherein the continuous optimization algorithmcomprises a generalized continuous optimization algorithm.

Example 23

The method of Example 21, wherein the continuous optimization algorithmcomprises a multivariable continuous optimization algorithm.

Example 24

The method of Example 21, wherein the continuous optimization algorithmcomprises a constrained continuous optimization algorithm.

Example 25

The method of Example 20, wherein the cost function includes a summationof the one or more cost elements.

Example 26

The method of Example 20, wherein the cost function is evaluated bysimulating operation of the electrical system with application of theset of control variables over the upcoming time domain.

Example 27

The method of Example 26, wherein evaluating the cost function comprisesreturning a summation of the one or more cost elements incurred duringthe simulated operation of the control system over the upcoming timedomain.

Example 28

The method of Example 19, wherein the one or more cost elements includean electricity cost.

Example 29

The method of Example 19, wherein the one or more cost elements includea battery degradation cost.

Example 30

The method of Example 19, wherein the one or more cost elements includeone or more of an electricity cost, a tariff definition, a batterydegradation cost, an incentive associated with operation of theelectrical system, a payment for contracted maneuvers, a value ofreserve energy, revenue for demand response opportunities, revenue forancillary services, a cost of local generation, and penalties andrevenues associated with deviation from a prescribed or contractedoperating plan.

Example 31

The method of Example 19, wherein the set of control variables is one ofa plurality of control variable sets within a control parameter set X,each of the plurality of control variable sets to be applied to adifferent time segment within an upcoming time domain, the set ofcontrol variables to be applied to a corresponding time segment of theupcoming time domain and each other set of the plurality of controlvariable sets to be applied during a different time segment of theupcoming time domain, wherein determining the set of values includesdetermining a set of values for each control variable set of X, andwherein providing the set of control values includes providing the setof values for X.

Example 32

The method of Example 31, wherein the wherein time segments of theupcoming time domain are defined such that an electricity cost elementis constant during each time segment.

Example 33

The method of Example 19, wherein the cost elements include one or moreof contracted maneuvers, demand response maneuvers, and ancillaryservice maneuvers are continuous during each time segment, and whereinthe time segments of the upcoming time domain are defined such that theone or more of contracted maneuvers, demand response maneuvers, andancillary service maneuvers are continuous during each time segment.

Example 34

The method of Example 19, wherein the one or more cost elements includea tariff definition.

Example 35

The method of Example 34, wherein the tariff definition includes adefinition of an electricity supply tariff.

Example 36

The method of Example 35, wherein the electricity supply tariff includestime of use supply rates and associated time windows.

Example 37

The method of Example 34, wherein the tariff definition is a definitionof an electricity demand tariff.

Example 38

The method of Example 37, wherein the electricity demand tariff includesdemand rates and associated time windows.

Example 39

The method of Example 19, wherein the set of configuration elementsdefine the one or more cost elements by specifying how to calculate anamount for each of the one or more cost elements.

Example 40

The method of Example 19, wherein the one or more cost elements includeone or more incentives associated with operation of the electricalsystem.

Example 41

The method of Example 40, wherein the one or more incentives associatedwith operation of the electrical system include an incentive revenue.

Example 42

The method of Example 40, wherein the one or more incentives associatedwith operation of the electrical system include a demand responserevenue.

Example 43

The method of Example 40, wherein the one or more incentives associatedwith operation of the electrical system include a value of reservebattery capacity for backup power.

Example 44

The method of Example 40, wherein the one or more incentives associatedwith operation of the electrical system include a contracted maneuver.

Example 45

The method of Example 40, wherein the one or more incentives associatedwith operation of the electrical system include a revenue for ancillaryservices.

Example 46

The method of Example 40, wherein the set of configuration elementsdefine the one or more incentives by specifying how to calculate anamount for each of the one or more incentives.

Example 47

The method of Example 19, wherein the one or more cost elements includea cost of local generation.

Example 48

The method of Example 19, wherein the one or more cost elements includepenalties associated with deviation from a prescribed or contractedoperating plan.

Example 49

The method of Example 19, wherein the one or more cost elements includerevenue associated with deviation from a prescribed or contractedoperating plan.

Example 50

The method of Example 19, further comprising: receiving a set ofexternal inputs providing indication of one or more conditions that areexternal to the controller and the electrical system, wherein the set ofvalues for the set of control variables is determined by alsoconsidering the one or more conditions.

Example 51

The method of Example 19, further comprising predicting a load on theelectrical system during the upcoming time domain, wherein thedetermining the set of control values for the set of control variablesincludes consideration of the predicted load on the electrical systemduring the upcoming time domain.

Example 52

The method of Example 51, wherein predicting the load comprisesperforming a regression of a parameterized historic load shape againsthistoric load data.

Example 53

The method of Example 19, further comprising predicting generation by alocal generator of the electrical system during a future time domain,wherein the determining the set of control values for the set of controlvariables includes consideration of the predicted load on the electricalsystem during the upcoming time domain.

Example 54

The method of Example 19, the set of control variables comprising one ofa plurality of control variables sets within a control parameter set X,each of the plurality of control variable sets to be applied to adifferent time segment within the upcoming time domain, the set ofcontrol variables to be applied to a corresponding time segment of theupcoming time domain and each other set within the control parameter setX to be applied during a different time segment of the upcoming timedomain, wherein determining the set of control values for the set ofcontrol variables further comprises determining a set of values for thecontrol parameter set X, wherein providing the set of control values forthe set of control variables comprises providing the set of values forthe control parameter set X.

Example 55

The method of Example 54, wherein providing the set of values for thecontrol parameter set X comprises providing a given set of controlvalues for each of the plurality of sets of control variables of thecontrol parameter set X in advance of a corresponding time segment ofthe upcoming time domain.

Example 56

The method of Example 54, wherein providing the set of values for thecontrol parameter set X comprises providing the control variable set tobe applied to the electrical system at the present time.

Example 57

The method of Example 54, wherein determining the set of values for thecontrol parameter set X comprises: preparing a cost function to operateon a current set of values for the control parameter set X, the costfunction including the one or more constraints and the one or more costelements associated with operation of the electrical system; andexecuting a minimization (e.g., a generalized minimization) of the costfunction based on the current set of values for the control parameterset X to determine an optimal set of values for the control parameterset X.

Example 58

The method of Example 54, the determining the set of values for thecontrol parameter set X is performed by an economic optimizer comprisinga first processing device, wherein the economic optimizer provides theset of values for the control parameter set X to a dynamic manager (orhigh speed controller), wherein the dynamic manager determines thevalues for the set of control variables by utilizing the set of valuesfor the control parameter set X in conjunction with a control law, andwherein the dynamic manager provides the set of values for the controlparameter set X to the electrical system.

Example 59

The method of Example 58, wherein the dynamic manager provides a givenset of control values for each of the plurality of sets of controlvariables of the control parameter set X at (e.g., before, or during) acorresponding time segment of the upcoming time domain.

Example 60

The method of Example 19, further comprising: preparing, by an economicoptimizer, a cost function to operate on a current set of values for acontrol parameter set X comprising a plurality of sets of controlvariables each to be applied during different time segments of theupcoming time domain, the cost function including the one or moreconstraints and the one or more cost elements associated with operationof the electrical system; executing, by the economic optimizer, ageneralized minimization of the cost function based on the current setof values for a control parameter set X to determine optimal set ofvalues for control parameter set X; and providing the control parameterset X to a dynamic manager (e.g., a high speed controller), wherein thedynamic manager determines the set of control values for the set ofcontrol variables by utilizing the control parameter set X inconjunction with a control law, and wherein the dynamic manager providesthe set of values for the set of control variables to the electricalsystem.

Example 61

A controller to improve operation of an electrical system, thecontroller comprising: a communication interface to couple to acommunication path to an electrical system; and one or more processorsto: determine a set of control values for a set of control variables toeffectuate a change to the electrical system toward meeting a controllerobjective for optimization of the electrical system, wherein the set ofcontrol values are determined by the one or more processors utilizing anoptimization algorithm to identify the set of control values inaccordance with one or more constraints associated with operation of theelectrical system; and provide the values for the set of controlvariables to the electrical system via the communication interface.

Example 62

The controller of Example 61, wherein the one or more processors arefurther to receive a set of configuration elements specifying the one ormore constraints of the electrical system.

Example 63

The controller of Example 61, wherein the one or more processors arefurther to receive, via the communication interface, a set of processvariables that provide one or more measurements of a state of theelectrical system.

Example 64

The controller of Example 61, wherein the one or more processorsdetermine the set of values for the set of control variables by:preparing an objective function to operate on the set of controlvariables, the objective function including the one or more constraints;and executing an optimization of the objective function by utilizing theoptimization algorithm to find the set of values for the set of controlvariables.

Example 65

The controller of Example 61, wherein the one or more processors arefurther to receive, via the communication interface, a set of externalinputs providing indication of one or more conditions that are externalto the controller and the electrical system, wherein the one or moreprocessors determine the set of values for the set of control variableswith consideration of the one or more conditions.

Example 66

The controller of Example 61, further comprising predicting one or moreof a load on the electrical system and generation by a local generatorof the electrical system during an upcoming time domain, wherein thedetermining the set of control values for the set of control variablesincludes consideration of the predicted one or more of the predictedload and predicted generation during the upcoming time domain.

Example 67

The controller of Example 61, wherein the optimization algorithm is oneor more of: a continuous optimization algorithm, a constrainedoptimization algorithm, a generalized optimization algorithm, and amultivariable optimization algorithm.

Example 68

The controller of Example 61, wherein the set of control variables isone of a plurality of control variable sets within a control parameterset X, each of the plurality of control variable sets to be applied to adifferent time segment within an upcoming time domain, the set ofcontrol variables to be applied to a corresponding time segment of theupcoming time domain and each other set of the plurality of controlvariable sets to be applied during a different time segment of theupcoming time domain, wherein the one or more processors are further todetermine a set of values for each control variable set of X and toprovide the set of values for X.

Example 69

The controller of Example 68, wherein providing the set of values for Xcomprises providing a given set of control values for each of theplurality of sets of control variables of X individually at acorresponding time segment of the upcoming time domain.

Example 70

A controller to improve operation of an electrical system, thecontroller comprising: an economic optimizer to: prepare an objectivefunction to operate on a current set of values for a control parameterset X comprising a plurality of sets of control variables each to beapplied during different time segments of an upcoming time domain, thecost function including one or more constraints associated withoperation of the electrical system; and execute an optimization of theobjective function based on the current set of values for a controlparameter set X to determine an optimal set of values for controlparameter set X; and a dynamic manager to: receive the values for thecontrol parameter set X from the economic optimizer; determine a set ofcontrol values for a set of control variables to effectuate a change tothe electrical system toward meeting a controller objective foroperation of the electrical system, the set of control values determinedbased on a control law and the values for the control parameter set X;and provide the values for the control variable to the electrical systemvia the a communication interface coupling to a communication path tothe electrical system.

Example 71

A controller of an electrical system that includes a battery, thecontroller comprising: a communication interface to interface with acommunication path with an electrical system and to receive a state ofcharge of a battery of the electrical system; and one or more processorsto: determine a throughput component of degradation of the battery for atime period; determine an aging component of degradation of the batteryfor the time period; sum the throughput component and the agingcomponent to determine a total battery degradation for the time period;and determine a battery degradation cost based on the total batterydegradation for the time period.

Example 72

The controller of Example 71, wherein the one or more processors arefurther configured to: determine a set of control values for a set ofcontrol variables to effectuate a change to the electrical system towardmeeting a controller objective for economical optimization of theelectrical system during an upcoming time domain, wherein the set ofcontrol values are determined by the one or more processors inaccordance with one or more cost elements associated with operation ofthe electrical system, including the battery degradation cost; andprovide the values for the set of control variables to the electricalsystem via the communication interface.

Example 73

The controller of claim Example 72, wherein the one or more processorsdetermine the set of control values utilizing of an optimizationalgorithm (e.g. a continuous optimization algorithm).

Example 74

The controller of Example 71, wherein the one or more processorsdetermine the throughput component based on a rate of battery capacityloss versus a change in the state of charge of the battery.

Example 75

The controller of Example 71, wherein the one or more processorsdetermine the throughput component of the degradation of the battery forthe time period t=t₁ to t₂ as:

${C_{f,{lost},{wear}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}},{wherein}$${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$provides a discharge formulation applicable during a decreasing state ofcharge and

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + F}$provides a charge formulation applicable during an increasing state ofcharge, and wherein SoC is the state of charge of the battery, A and Bspecify the rate of increase in degradation during discharging, Erepresents the baseline degradation during discharging, C and D specifythe rate of increase in degradation during charging, and F representsthe baseline degradation during charging.

Example 76

The controller of Example 71, wherein the one or more processorsdetermine the aging component based on a rate of battery capacity lossversus time.

Example 77

The controller of Example 71, wherein the one or more processorsdetermine the aging component of the degradation of the battery for thetime period t=t₁ to t₂ as:

${C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{{dC}_{f,{lost}}}{dt}{dt}}}},{wherein}$${\frac{{dC}_{f,{lost}}}{dt} = {G*\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)}},$wherein SoC is the state of charge of the battery, G represents thebaseline aging rate, H and I specify the rate of increase in aging rateat high SoC, and J and K specify the rate of increase in aging rate atlow SoC.

Example 78

The controller of Example 71, wherein determining the batterydegradation cost comprises multiplying the total battery degradation forthe time period by a cost factor.

Example 79

The controller of Example 78, wherein the cost factor is based on aninitial cost of the battery.

Example 80

The controller of Example 78, wherein the cost factor is determined as atotal cost of the battery divided by the amount of battery degradationresulting in end of life of the battery.

Example 81

The controller of Example 71, wherein the one or more processors arefurther to: receive a set of configuration elements specifying a mannerof calculating each of one or more cost elements associated withoperation of the electrical system, the one or more cost elementsincluding electricity cost and the battery degradation cost; receive aset of process variables that include one or more measurements of astate of the electrical system, including a state of charge of thebattery; determine values for a set of control variables to provide tothe electrical system to effectuate a change to the electrical systemtoward meeting a controller objective for economical optimization of theelectrical system; and provide the values for the set of controlvariables to the electrical system.

Example 82

A method of a controller of an electrical system including a battery,the method comprising: receiving from a sensor of an electrical system astate of charge of a battery of the electrical system; determining by aprocessor a throughput component of degradation of the battery for atime period, the throughput component determined based on a rate ofbattery capacity loss versus a change in the state of charge of thebattery; determining by the processor an aging component of degradationof the battery for the time period, the aging component determined basedon a rate of battery capacity loss versus time; summing by the processorthe throughput component and the aging component to determine a totalbattery degradation (e.g., a change in capacity of the battery, a changein maximum discharge current of the battery, a change in the seriesresistance of the battery) for the time period; determining a batterydegradation cost based on the total battery degradation for the timeperiod; determining values for a set of control variables forconfiguring the electrical system, wherein the values are determinedbased on the battery degradation cost; and providing the values for theset of control variables to the electrical system.

Example 83

The method of Example 82, wherein the throughput component comprises afunction of the rate of charge or discharge of the battery, the state ofcharge of the battery, and the temperature of the battery.

Example 84

The method of Example 82, wherein the aging component comprises afunction of the battery state including the state of charge of thebattery and a temperature of the battery.

Example 85

The method of Example 82, further comprising: receiving a set ofconfiguration elements specifying a manner of calculating each of one ormore cost elements associated with operation of the electrical system,the one or more cost elements including electricity cost and the batterydegradation cost; receiving a set of process variables that include oneor more measurements of a state of the electrical system, including astate of charge of the battery; determining values for a set of controlvariables to provide to the electrical system to effectuate a change tothe electrical system toward meeting a controller objective foreconomical optimization of the electrical system; and providing thevalues for the set of control variables to the electrical system.

Example 86

The method of Example 85, wherein the set of configuration elementsspecify one or more constraints of the electrical system, and whereinthe determining values for the set of control variables includesutilization of a continuous optimization algorithm to find the set ofvalues for the set of control variables according to the one or morecost elements and the one or more constraints.

Example 87

The method of Example 82, wherein the throughput component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{wear}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}},{wherein}$${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$provides a discharge formulation applicable during a decreasing state ofcharge and

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + F}$provides a charge formulation applicable during an increasing state ofcharge, and wherein SoC is the state of charge of the battery, A and Bspecify the rate of increase in degradation during discharging, Erepresents the baseline degradation during discharging, C and D specifythe rate of increase in degradation during charging, and F representsthe baseline degradation during charging.

Example 88

The method of Example 82, wherein the aging component of the degradationof the battery for the time period t=t₁ to t₂ is evaluated as:

${C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}},{wherein}$$\frac{\partial C_{f,{lost}}}{\partial t} = {G*\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)}$wherein SoC is the state of charge of the battery, G represents thebaseline aging rate, H and I specify the rate of increase in aging rateat high SoC, and J and K specify the rate of increase in aging rate atlow SoC.

Example 89

The method of Example 82, wherein determining the battery degradationcost comprises multiplying the total battery degradation for the timeperiod by a cost factor.

Example 90

The method of Example 89, wherein the cost factor is based on a totalcost of the battery.

Example 91

The method of Example 89, wherein the cost factor is determined as atotal cost of the battery divided by the amount of battery degradationresulting in end of life of the battery.

Example 92

A computer-implemented method of a controller of an electrical systemincluding a battery, the method comprising: receiving from a sensor ofan electrical system a state of charge of a battery of the electricalsystem; determining on a computing device a battery degradation cost ofa battery of the electrical system based on the state of charge of thebattery; determining values for a set of control variables to provide tothe electrical system to effectuate a change to the electrical systemtoward meeting a controller objective for economical optimization of theelectrical system, wherein the values are determined based on thebattery degradation cost, one or more cost elements, and/or one or moreconstraints on the electrical system; providing the values for the setof control variables to the electrical system.

Example 93

The method of Example 92, wherein determining the battery degradationcost comprises: determining a throughput component of degradation of thebattery for a time period; determining an aging component of degradationof the battery for the time period; summing the throughput component andthe aging component to determine a total battery degradation for thetime period; determining the battery degradation cost based on the totalbattery degradation for the time period.

Example 94

The method of Example 93, wherein the throughput component is determinedbased on a rate of battery capacity loss versus a change in the state ofcharge of the battery.

Example 95

The method of Example 93, wherein the aging component is determinedbased on a rate of battery capacity loss versus time.

Example 96

The method of Example 93, wherein determining the battery degradationcost comprises multiplying the total battery degradation for the timeperiod by a cost factor.

Example 97

The method of Example 96, wherein the cost factor is based on a totalcost of the battery.

Example 98

The method of Example 96, wherein the cost factor is determined as thetotal cost of the battery divided by the amount of battery degradationresulting in end of life of the battery.

Example 99

A controller of an electrical system that includes a battery, thecontroller comprising: a communication interface to receive indicationof a current state of a battery of the electrical system and a batteryoperating profile for a time period; and one or more processors to:determine degradation of the battery for the time period based on thecurrent state of the battery and based on a battery operating profilefor the time period; and determine a battery degradation cost based onthe degradation of the battery for the time period.

Example 100

The controller of Example 99, wherein the one or more processorsdetermine the degradation of the battery by: determining a throughputcomponent of degradation of the battery for a time period; determiningan aging component of degradation of the battery for the time period;and summing the throughput component and the aging component todetermine a total battery degradation for the time period.

Example 101

The controller of Example 99, wherein the one or more processorscalculate the degradation of the battery as an integral of an integrandthat comprises one or both of a throughput term, which includes apartial differential of a battery condition with respect to a state ofcharge, and an aging term, which includes a partial differential of abattery condition with respect to time.

Example 102

The controller of Example 101, wherein the throughput term comprises afunction of the rate of charge or discharge of the battery, the state ofcharge of the battery, and the temperature of the battery.

Example 103

The controller of claim 101, wherein the throughput term represents arate of battery capacity loss versus a change in the state of charge ofthe battery.

Example 104

The controller of Example 101, wherein the aging term comprises afunction of the battery state including the state of charge of thebattery and a temperature of the battery.

Example 105

The controller Example 101, wherein the aging term represents a rate ofbattery capacity loss versus time.

Example 106

A computer-implemented method of determining the cost of operating abattery system for a time period, receiving at a computing device, froma meter, a state of charge of a battery of the battery system;determining on the computing device a throughput component ofdegradation of the battery for a time period, the throughput componentdetermined based on a rate of battery capacity loss versus a change inthe state of charge of the battery; determining on the computing devicean aging component of degradation of the battery for the time period,the aging component determined based on a rate of battery capacity lossversus time; summing on the computing device the throughput componentand the aging component to determine a total battery degradation (e.g.,a change in capacity of the battery) for the time period; multiplying onthe computing device the total battery degradation for the time periodby a cost factor to determine a cost of operating the battery system.

Example 107

The method of Example 106, wherein the cost factor is based on a totalcost of the battery.

Example 108

The method of Example 106, wherein the cost factor is determined as thetotal cost of the battery divided by the amount of battery degradationresulting in end of life of the battery.

Example 109

The method of Example 106, wherein the throughput component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{wear}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}},{wherein}$${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$provides a discharge formulation applicable during a decreasing state ofcharge and

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + F}$provides a charge formulation applicable during an increasing state ofcharge, and wherein SoC is the state of charge of the battery, A and Bspecify the rate of increase in degradation during discharging, Erepresents the baseline degradation during discharging, C and D specifythe rate of increase in degradation during charging, and F representsthe baseline degradation during charging.

Example 110

The method of Example 106, wherein the aging component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}},{wherein}$$\frac{\partial C_{f,{lost}}}{\partial t} = {G*\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)}$wherein SoC is the state of charge of the battery, G represents thebaseline aging rate, H and I specify the rate of increase in aging rateat high SoC, and J and K specify the rate of increase in aging rate atlow SoC.

Example 111

A computer-implemented method of determining battery degradation of abattery for an upcoming time period, comprising: receiving at acomputing device (e.g., from a meter) a state of charge of the battery;determining at the computing device a throughput component ofdegradation of the battery for the upcoming time period, the throughputcomponent determined based on a rate of battery capacity loss versus achange in the state of charge of the battery; determining on thecomputing device an aging component of degradation of the battery forthe time period, the aging component determined based on a rate ofbattery capacity loss versus time; and summing on the computing devicethe throughput component and the aging component to determine a totalbattery degradation for the upcoming time period.

Example 112

The method of claim 111, wherein the throughput component comprises afunction of the rate of charge or discharge of the battery, the state ofcharge of the battery, and the temperature of the battery.

Example 113

The method of Example 111, wherein the throughput component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{wear}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}},{wherein}$${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$provides a discharge formulation applicable during a decreasing state ofcharge and

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + F}$provides a charge formulation applicable during an increasing state ofcharge, and wherein SoC is the state of charge of the battery, A and Bspecify the rate of increase in degradation during discharging, Erepresents the baseline degradation during discharging, C and D specifythe rate of increase in degradation during charging, and F representsthe baseline degradation during charging.

Example 114

The method of Example 111, wherein the aging component comprises afunction of the battery state including the state of charge of thebattery and a temperature of the battery.

Example 115

The method of Example 111, wherein the aging component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}},{wherein}$$\frac{\partial C_{f,{lost}}}{\partial t} = {G*\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)}$wherein SoC is the state of charge of the battery, G represents thebaseline aging rate, H and I specify the rate of increase in aging rateat high SoC, and J and K specify the rate of increase in aging rate atlow SoC.

Example 116

A computer-implemented method of determining battery degradation of abattery for an upcoming time period, comprising: receiving at acomputing device (e.g., from a meter) indication of a current state ofthe battery; and determining degradation of the battery as an integralof an integrand that comprises one or both of a throughput term, whichincludes a partial differential of a battery condition with respect tothe current state of the battery, and an aging term, which includes apartial differential of a battery condition with respect to time.

Example 117

The method of claim 116, wherein the throughput component comprises afunction of the rate of charge or discharge of the battery, the state ofcharge of the battery, and the temperature of the battery.

Example 118

The method of Example 116, wherein the throughput component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{wear}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial{SoC}}\frac{dSoC}{dt}{dt}}}},{wherein}$${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{discharge}} = {{A*e^{- {BSoC}}} + E}$provides a discharge formulation applicable during a decreasing state ofcharge and

${\frac{\partial C_{f,{lost}}}{\partial{SoC}}\mspace{14mu}\,_{charge}} = {{C*e^{D{({{SoC} - 1})}}} + F}$provides a charge formulation applicable during an increasing state ofcharge, and wherein SoC is the state of charge of the battery, A and Bspecify the rate of increase in degradation during discharging, Erepresents the baseline degradation during discharging, C and D specifythe rate of increase in degradation during charging, and F representsthe baseline degradation during charging.

Example 119

The method of Example 116, wherein the aging component comprises afunction of the battery state including the state of charge of thebattery and a temperature of the battery.

Example 120

The method of Example 116, wherein the aging component of thedegradation of the battery for the time period t=t₁ to t₂ is evaluatedas:

${C_{f,{lost},{aging}} = {\int_{t = t_{1}}^{t = t_{2}}{\frac{\partial C_{f,{lost}}}{\partial t}{dt}}}},{wherein}$$\frac{\partial C_{f,{lost}}}{\partial t} = {G*\left( {1 - {\left( {1 - H} \right)e^{- \frac{SoC}{I}}}} \right)*\left( {1 - {\left( {1 - J} \right)e^{\frac{({{SoC} - 1})}{K}}}} \right)}$wherein SoC is the state of charge of the battery, G represents thebaseline aging rate, H and I specify the rate of increase in aging rateat high SoC, and J and K specify the rate of increase in aging rate atlow SoC.

Example 121

An electrical system controller to optimize overall economics ofoperation of an electrical system, the controller comprising: a firstcomputing device (e.g., an economic optimizer) to determine a controlplan for managing control of the electrical system during an upcomingtime domain and provide the control plan as output, the control planincluding a plurality of sets of parameters each to be applied for adifferent time segment within the upcoming time domain; and a secondcomputing device (e.g., a dynamic manager, or high speed controller) todetermine a set of control values for a set of control variables for agiven time segment of the upcoming time domain and provide the set ofcontrol values to the electrical system to effectuate a change to theelectrical system toward meeting the controller objective for economicaloptimization of the electrical system during the upcoming time domain,wherein the second computing device determines the set of control valuesbased on a control law and a set of values for a given set of parametersof the plurality of sets of parameters of the control plan, wherein thegiven set of parameters corresponds to an upcoming time segment.

Example 122

The electrical system controller of Example 121, wherein the firstcomputing device determines the control plan based on a set ofconfiguration elements and a set of process variables, the set ofconfiguration elements specifying one or more constraints of theelectrical system and defining one or more cost elements associated withoperation of the electrical system, the set of process variablesproviding one or more measurements of a state of the electrical system.

Example 123

The electrical system controller of Example 121, wherein the firstcomputing device determines the control plan by: preparing a costfunction to be evaluated based on the plurality of sets of controlparameters, the cost function including the one or more constraints andthe one or more cost elements associated with operation of theelectrical system; and executing an minimization (e.g., a generalizedminimization) of the cost function to determine optimal values for theplurality of sets of control parameters.

Example 124

The electrical system controller of Example 123, wherein the firstcomputing device executes the minimization of the cost function byutilizing an optimization algorithm to identify the optimal values inaccordance with the one or more constraints and the one or more costelements.

Example 125

The electrical system controller of Example 124, wherein theoptimization algorithm comprises one or more of: a continuousoptimization algorithm, a constrained optimization algorithm, ageneralized optimization algorithm, and a multivariable optimizationalgorithm.

Example 126

The electrical system controller of Example 121, wherein the firstcomputing device is further to receive a set of process variables thatprovide one or more measurements of a state of the electrical system,the set of process variables to be used to determine progress towardmeeting the objective for economical optimization of the electricalsystem, wherein the first computing device determines the control planbased on the set of process variables.

Example 127

The electrical system controller of Example 121, wherein the secondcomputing device providing the set of values to the electrical systemcomprises providing given values for a given set of the plurality ofsets of control parameters, wherein the given set corresponds to a giventime segment during the upcoming time domain.

Example 128

The electrical system controller of Example 121, wherein the set ofvalues comprises a set of control values for a set of control variablescorresponding to a given time segment of the upcoming time domain,wherein the second computing device determines the set of control valuesbased on a control law and a set of values for a given set of theplurality of sets of control parameters of the control plan, wherein thegiven set of the plurality of sets of control parameters corresponds tothe given time segment.

Example 129

The electrical system controller of Example 128, wherein the secondcomputing device is further to receive a set of process variables, andwherein the second computing device determines the set of control valuesbased on the set of process variables.

Example 130

The electrical system controller of Example 121, wherein the firstcomputing device is further to predict one or more of a load on theelectrical system and generation by a local generator of the electricalsystem during the upcoming time domain, wherein the first computingdevice determines the control plan considering the predicted one or moreof the predicted load and predicted generation during the upcoming timedomain.

Example 131

The electrical system controller of Example 121, wherein the pluralityof sets of control parameters comprises a control parameter set X,wherein the first computing device is further to determine the controlplan by determining an optimal set of values for the control parameterset X.

Example 132

A computer-implemented method to optimize overall economics of operationof an electrical system, the method comprising: determining on a firstcomputing device a control plan that includes values of a plurality ofsets of control parameters, each set of the plurality of sets to beapplied for a different time segment within an upcoming time domain;providing the control plan to a second computing device for managingcontrol of the electrical system during the upcoming time domain; andproviding, by the second computing device, a set of values to theelectrical system to effectuate a change to the electrical system towardmeeting an objective for economical optimization of the electricalsystem during the upcoming time domain, the set of values providedaccording to the control plan.

Example 133

The method of Example 132, further comprising: receiving at the firstcomputing device a set of configuration elements specifying one or moreconstraints of the electrical system and defining one or more costelements associated with operation of the electrical system, wherein thedetermining the control plan is based on the one or more constraints andthe one or more cost elements.

Example 134

The method of Example 133, wherein determining the control plancomprises preparing a cost function to be evaluated based on theplurality of sets of control parameters, the cost function including theone or more constraints and the one or more cost elements associatedwith operation of the electrical system; and executing a minimization ofthe cost function to determine optimal values for the plurality of setsof control parameters.

Example 135

The method of Example 134, wherein executing the minimization of thecost function comprises utilization of an optimization algorithm toidentify the optimal values in accordance with the one or moreconstraints and the one or more cost elements.

Example 136

The method of Example 135, wherein the optimization algorithm comprisesone or more of: a continuous optimization algorithm, a constrainedoptimization algorithm, a generalized optimization algorithm, and amultivariable optimization algorithm.

Example 137

The method of Example 132, further comprising: receiving at the firstcomputing device a set of process variables that provide one or moremeasurements of a state of the electrical system, the set of processvariables to be used to determine progress toward meeting the objectivefor economical optimization of the electrical system, wherein thecontrol plan is determined based on the set of process variables.

Example 138

The method of Example 132, wherein the providing the set of values tothe electrical system comprises providing given values for a given setof the plurality of sets of control parameters, wherein the given setcorresponds to a given time segment during the upcoming time domain,wherein the given values are provided (e.g., separately from other setsof the plurality of sets of control parameters, in anticipation of thecorresponding time segment) to effectuate a change to the electricalsystem toward meeting an objective for economical optimization of theelectrical system during the given time segment of the upcoming timedomain.

Example 139

The method of Example 132, wherein the set of values comprises a set ofcontrol values for a set of control variables corresponding to a giventime segment of the upcoming time domain, the method further comprising:determining on the second computing device the set of control valuesbased on a control law and a set of values for a given set of theplurality of sets of control parameters of the control plan, wherein thegiven set of the plurality of sets of control parameters corresponds tothe given time segment.

Example 140

The method of Example 139, further comprising receiving at the secondcomputing device a set of process variables, wherein the determining onthe second computing device the set of control values is further basedon the set of process variables.

Example 141

The method of Example 132, further comprising predicting on the firstcomputing device one or more of a load on the electrical system andgeneration by a local generator of the electrical system during theupcoming time domain, wherein the determining the control plan includesconsideration of the predicted one or more of the predicted load andpredicted generation during the upcoming time domain.

Example 142

The method of Example 132, wherein the plurality of sets of controlparameters comprise a control parameter set X, wherein determining thecontrol plan comprises determining an optimal set of values for thecontrol parameter set X.

Example 143

The method of Example 132, wherein providing the set of values to theelectrical system comprises providing given values from the optimal setof values, the given values corresponding to a given set of theplurality of sets of control parameters, the given set corresponding toa given time segment during the upcoming time domain, wherein the givenvalues are provided (e.g., separately from other sets of the pluralityof sets of control parameters, in anticipation of the corresponding timesegment) to effectuate a change to the electrical system toward meetingan objective for economical optimization of the electrical system duringthe given time segment of the upcoming time domain.

Example 144

An electrical system controller to optimize overall economics ofoperation of an electrical system, the controller comprising: a firstcomputing device (e.g., an economic optimizer) to determine an optimalset of values for a control parameter set X and provide the optimal setof values as output for managing control of the electrical system duringan upcoming time domain, the control parameter set X including aplurality of sets of parameters each to be applied for a different timesegment within the upcoming time domain, wherein the first computingdevice determines the optimal set of values for the control parameterset X based on a set of configuration elements and a set of processvariables, the set of configuration elements specifying one or moreconstraints of the electrical system and defining one or more costelements associated with operation of the electrical system, the set ofprocess variables providing one or more measurements of a state of theelectrical system; a second computing device (e.g., dynamic manager, orhigh speed controller) to determine a set of control values for a set ofcontrol variables for a given time segment of the upcoming time domainand to provide the set of control values to the electrical system,wherein the second computing device determines the set of control valuesbased on a control law and a set of values for a given set of parametersof the plurality of sets of parameters of the control parameter set X,wherein the given set of parameters corresponds to an upcoming timesegment.

Example 145

The electrical system controller of Example 144, wherein the firstcomputing device determines the optimal set of values for the controlparameter set X based on a set of configuration elements and a set ofprocess variables, the set of configuration elements specifying one ormore constraints of the electrical system and defining one or more costelements associated with operation of the electrical system, the set ofprocess variables providing one or more measurements of a state of theelectrical system.

Example 146

The electrical system controller of Example 145, wherein the firstcomputing device determines the optimal set of values for the controlparameter set X by: preparing a cost function to be evaluated based onthe plurality of sets of control parameters, the cost function includingthe one or more constraints and the one or more cost elements associatedwith operation of the electrical system; and executing a minimization ofthe cost function to determine optimal values for the plurality of setsof control parameters.

Example 147

The electrical system controller of Example 146, wherein the firstcomputing device executes the minimization of the cost function byutilizing an optimization algorithm to identify the optimal values inaccordance with the one or more constraints and the one or more costelements.

Example 148

The electrical system controller of Example 147, wherein theoptimization algorithm comprises one or more of: a continuousoptimization algorithm, a constrained optimization algorithm, ageneralized optimization algorithm, and a multivariable optimizationalgorithm.

Example 149

The electrical system controller of Example 144, wherein the firstcomputing device is further to receive a set of process variables thatprovide one or more measurements of a state of the electrical system,the set of process variables to be used to determine progress towardmeeting the objective for economical optimization of the electricalsystem, wherein the first computing device determines the optimal set ofvalues for the control parameter set X based on the set of processvariables.

Example 150

The electrical system controller of Example 149, wherein the secondcomputing device is further to receive a set of process variables, andwherein the second computing device determines the set of control valuesbased on the set of process variables.

Example 151

The electrical system controller of Example 144, wherein the firstcomputing device is further to predict one or more of a load on theelectrical system and generation by a local generator of the electricalsystem during the upcoming time domain, wherein the first computingdevice determines the control plan considering the predicted one or moreof the predicted load and predicted generation during the upcoming timedomain.

Example 152

A computer-implemented method to optimize overall economics of operationof an electrical system, the method comprising: determining on a firstcomputing device an optimal set of values for a control parameter set Xthat includes a plurality of sets of control parameters each to beapplied for a different time segment within an upcoming time domain;providing the optimal set of values for the control parameter set X to asecond computing device for managing control of the electrical systemduring the upcoming time domain; determining on a second computingdevice a set of control values for a set of control variablescorresponding to a given time segment of the upcoming time domain, thedetermining based on a control law and a set of values for a given setof control parameters of the plurality of sets of control parameters ofthe control parameter set X, wherein the given set of control parameterscorresponds to the given time segment; providing, by the secondcomputing device, the set of control values for the set of controlvariables to the electrical system to effectuate a change to theelectrical system toward meeting a controller objective for economicaloptimization of the electrical system during the upcoming time domain.

Example 153

A computer-implemented method to optimize overall economics of operationof an electrical system, the method comprising: determining on a firstcomputing device an optimal control plan that includes control valuesfor a plurality of sets of control parameters, each set of the pluralityof sets of control parameters to be applied for a different time segmentwithin an upcoming time domain; providing the optimal control plan to asecond computing device for managing control of the electrical systemduring the upcoming time domain; and providing, by the second computingdevice, a set of control values to the electrical system to effectuate achange to the electrical system toward meeting an objective foreconomical optimization of the electrical system during the upcomingtime domain.

Example 154

A computer-implemented method to optimize overall economics of operationof an electrical system, the method comprising: determining on a firstcomputing device an optimal set of values for a control parameter set Xthat includes a plurality of sets of control parameters each to beapplied for a different time segment within an upcoming time domain;providing the optimal set of values for the control parameter set X to asecond computing device for managing control of the electrical systemduring the upcoming time domain; and providing, by the second computingdevice, a set of values to the electrical system to effectuate a changeto the electrical system toward meeting an objective for economicaloptimization of the electrical system during the upcoming time domain.

Example 155

The method of Example 154, further comprising: receiving at the firstcomputing device a set of configuration elements specifying one or moreconstraints of the electrical system and defining one or more costelements associated with operation of the electrical system, wherein thedetermining the optimal set of values for the control parameter set X isbased on at least one of the one or more constraints and the one or morecost elements.

Example 156

The method of Example 155, wherein determining the optimal set of valuescomprises: preparing a cost function to operate on a current set ofvalues for the control parameter set X, the cost function including theone or more constraints and the one or more cost elements associatedwith operation of the electrical system; and executing a generalizedminimization of the cost function based on the current set of values forthe control parameter set X to determine the optimal set of values forthe control parameter set X.

Example 157

The method of Example 156, wherein executing the generalizedminimization of the cost function comprises utilization of a continuousoptimization algorithm to identify the optimal set of values inaccordance with the one or more constraints and the one or more costelements.

Example 158

The method of Example 157, wherein the continuous optimization algorithmcomprises one or more of a constrained continuous optimizationalgorithm, a generalized continuous optimization algorithm, and amultivariable continuous optimization algorithm.

Example 159

The method of Example 155, further comprising: receiving at the firstcomputing device a set of process variables that provide one or moremeasurements of a state of the electrical system, the set of processvariables to be used to determine progress toward meeting the objectivefor economical optimization of the electrical system, wherein thedetermining the optimal set of values for the control parameter set X isbased on the set of process variables.

Example 160

The method of Example 154, wherein providing the set of values to theelectrical system comprises providing given values for a given set ofcontrol parameters of the plurality of sets of control parameters forthe control parameter set X, wherein given set of control parameterscorresponds to a given time segment during the upcoming time domain,wherein the given values are provided separate from other of theplurality of sets of control parameters in anticipation of thecorresponding time segment to effectuate a change to the electricalsystem toward meeting an objective for economical optimization of theelectrical system during the given time segment of the upcoming timedomain.

Example 161

The method of Example 154, further comprising receiving at the secondcomputing device a set of process variables, wherein the providing bythe second computing device the set of values is based on the set ofprocess variables.

Example 162

The method of Example 154, further comprising predicting on the firstcomputing device one or more of a load on the electrical system andgeneration by a local generator of the electrical system during theupcoming time domain, wherein the determining the optimal set of valuesfor the control parameter set X includes consideration of the predictedone or more of the predicted load and predicted generation during theupcoming time domain.

Example 163

A computer-implemented method to optimize overall economics of operationof an electrical system, the method comprising: receiving at a firstcomputing device a set of configuration elements specifying one or moreconstraints of the electrical system and defining one or more costelements associated with operation of the electrical system; receivingat the first computing device a set of process variables that provideone or more measurements of a state of the electrical system, the set ofprocess variables to be used by the controller to determine progresstoward meeting a controller objective for economical optimization of theelectrical system; determining on the first computing device an optimalset of values for a control parameter set X that includes a plurality ofsets of parameters each to be applied for a different time segmentwithin an upcoming time domain; providing the optimal set of values forthe control parameter set X to a second computing device for managingcontrol of the electrical system during the upcoming time domain;receiving at the second computing device the set of values for thecontrol parameter set X; receiving at the second computing device theset of process variables; determine on the second computing device a setof control values for a set of control variables for a given timesegment of the upcoming time domain, based on a control law and a set ofvalues for a given set of parameters of the plurality of sets ofparameters of the control parameter set X, wherein the given set ofparameters corresponds to an upcoming time segment; providing, by thesecond computing device, the set of control values for the set ofcontrol variables to the electrical system to effectuate a change to theelectrical system toward meeting the controller objective for economicaloptimization of the electrical system during the upcoming time domain.

Example 164

The method of Example 163, wherein determining the optimal set of valuescomprises: preparing a cost function to operate on a current set ofvalues for the control parameter set X, the cost function including theone or more constraints and the one or more cost elements associatedwith operation of the electrical system; and executing a generalizedminimization of the cost function based on the current set of values forthe control parameter set X to determine the optimal set of values forthe control parameter set X.

Example 165

The method of Example 164, wherein preparing the cost function comprisespredicting a load on the electrical system during the upcoming timedomain.

Example 166

A controller to control an electrical system, the controller comprising:a communication interface to provide a communication path with anelectrical system; and one or more processors to: receive, via thecommunication interface, one or more measurements of a state of theelectrical system, each measurement designated as a value for a processvariable in a set of process variables; obtain a set of controlparameters to be applied for an extended time segment, each parameter ofthe set of control parameters specifying a behavior of a control law ofthe controller; apply the control law by comparing the set of processvariables to the set of control parameters to determine a value for eachcontrol variable of a set of control variables, each control variablecontrolling a component of the electrical system, the value of eachcontrol variable determined by the control law; and provide the valuesfor the set of control variables to the electrical system, via thecommunication interface, to effectuate a change to one or morecomponents of the electrical system.

Example 167

The controller of Example 166, the one or more processors obtain the setof control parameters by determining optimal values for the set ofcontrol parameters with an objective of economically optimizingoperation of the electrical system during the extended time segment.

Example 168

The controller of Example 167, wherein the one or more processorsdetermine optimal values for the set of control parameters to effectuatea change to the electrical system toward meeting a controller objectivefor economical optimization of the electrical system during an upcomingtime domain, wherein the set of control values are determined by the oneor more processors utilizing a continuous optimization algorithm toidentify the set of control values in accordance with one or moreconstraints and one or more cost elements associated with operation ofthe electrical system.

Example 169

The controller of Example 166, further comprising an economic optimizercomputing device to determine optimal values for the set of controlparameters with an objective of economically optimizing operation of theelectrical system during the extended time segment, wherein the economicoptimizer computing device electronically communicates the optimalvalues for the set of control parameters to the one or more processors.

Example 170

The controller of Example 169, wherein the economic optimizer computingdevices determines the optimal values by: receiving a set ofconfiguration elements specifying one or more constraints of theelectrical system and defining one or more cost elements associated withoperation of the electrical system; preparing a cost function to operatebased on the set of control parameters, the cost function including theone or more constraints and the one or more cost elements associatedwith operation of the electrical system; and executing a generalizedminimization of the cost function to determine optimal values for theset of control parameters with an objective of economical optimizationof the electrical system during the extended time segment.

Example 171

The controller of Example 166, wherein the one or more processorsreceive the process variables by reading the measurements of theelectrical system repeatedly during the time segment at a time interval,wherein the one or more processors apply the control law upon eachreading of the measurements at the time variable to determine a valuefor each control variable, and wherein the values of the set of controlvariables are communicated to the electrical system at least upon achange in a given value of a given control variable from a previous timeinterval.

Example 172

The controller of Example 166, wherein a parameter of the set of controlparameters specifies an upper limit of a process variable.

Example 173

The controller of Example 166, wherein a parameter of the set of controlparameters specifies a lower limit of a process variable.

Example 174

The controller of Example 166, wherein a parameter of the set of controlparameters specifies a nominal value at which a process variable is tobe directed to the extent that other constraints specified by otherparameters are not violated.

Example 175

The controller of Example 166, wherein the set of control parametersincludes a first parameter (e.g., U_(B)) that specifies an upper limitof a process variable, a second parameter (e.g., L_(B)) that specifies alower limit of the process variable, and a third parameter (e.g.,P_(nom)) that specifies a nominal value at which the process variable isto be directed to the extent that other constraints specified by thefirst parameter and the second parameter are not violated.

Example 176

The controller of Example 175, wherein the set of control parametersfurther includes a fourth parameter (e.g., U_(B0)) that specifies aconstraint value that the process variable is not to exceed, if apre-specified condition is met.

Example 177

The controller of Example 166, wherein the set of process variablesinclude one or more of a measurement of a load on the electrical systemand a measurement of demand of the electrical system.

Example 178

The controller of Example 166, wherein the set of control variablesincludes one or more variables to control one or more of batterycharging and battery discharging.

Example 179

The controller of Example 166, wherein the set of control variablesincludes one or more variables to control a power generation componentof the electrical system.

Example 180

A computer-implemented method of a controller of an electrical system,the method comprising: obtaining a set of control parameters to beapplied for an extended time segment of an upcoming time domain, eachparameter of the set of control parameters specifying a behavior (orproperty) of a control law of the controller under various conditions;receiving a set of process variables that provide one or moremeasurements of a state of the electrical system; applying the controllaw, including comparing the set of process variables to the set ofcontrol parameters according to the control law, to determine a valuefor each control variable of a set of control variables, each controlvariable controlling a component of the electrical system, the value ofeach control variable determined by the control law (e.g., to promoteand maintain compliance of the electrical system with one or moreconditions of the control law specified by the set of controlparameters); and providing the values for the set of control variablesto the electrical system to effectuate a change to one or morecomponents of the electrical system (e.g., to promote and maintaincompliance of the electrical system with one or more conditions of thecontrol law specified by the set of control parameters).

Example 181

The method of Example 180, wherein obtaining the set of controlparameters comprises determining a value for each control parameter inthe set of control parameters by: receiving a set of configurationelements specifying one or more constraints of the electrical system anddefining one or more cost elements associated with operation of theelectrical system; preparing a cost function to operate based on the setof control parameters, the cost function including the one or moreconstraints and the one or more cost elements associated with operationof the electrical system; and executing a generalized minimization ofthe cost function to determine optimal values for the set of controlparameters with an objective of economical optimization of theelectrical system during the extended time segment.

Example 182

The method of Example 180, wherein obtaining the set of controlparameters comprises receiving values for the set of control parametersfrom an economic optimizer computing device that determines optimalvalues for the set of control parameters to economically optimizeoperation of the electrical system during the extended time segment.

Example 183

The method of Example 180, wherein receiving the process variablescomprises reading the process variables repeatedly during the timesegment at a time interval, wherein applying the control law comprisesdetermining a value for each control variable upon each reading of theprocess variables at the time variable, and wherein providing the set ofcontrol variables comprises communicating the values of the set ofcontrol variables to the electrical system at least upon a change in agiven value of a given control variable from a previous time interval.

Example 184

The method of Example 180, wherein a parameter of the set of controlparameters specifies an upper limit (e.g., an upper bound or uppersetpoint, U_(B)) of a process variable (e.g., a measurement of theelectrical system).

Example 185

The method of Example 180, wherein a parameter of the set of controlparameters specifies a lower limit (e.g., a lower bound or lowersetpoint L_(B)) of a process variable (e.g., a measurement of theelectrical system).

Example 186

The method of Example 185, wherein a parameter of the set of controlparameters specifies whether or not the lower limit is to be equal to anupper limit or some other prescribed value.

Example 187

The method of Example 180, wherein a parameter of the set of controlparameters specifies a default (e.g., a nominal, P_(nom)) value at whicha process variable (e.g., a measurement of the electrical system) is tobe directed to the extent that other constraints specified by otherparameters are not violated.

Example 188

The method of Example 180, wherein a parameter of the set of controlparameters specifies a constraint value that a process variable (e.g., ameasurement of the electrical system) is not to exceed if apre-specified condition is met.

Example 189

The method of Example 180, wherein a parameter of the set of controlparameters specifies a constraint value that a process variable (e.g., ameasurement of the electrical system) is limited, if a different,separate, pre-specified condition is met.

Example 190

The method of Example 180, wherein the set of control parametersincludes a first parameter (e.g., U_(B)) that specifies an upper limitof a process variable, a second parameter (e.g., L_(B)) that specifies alower limit of the process variable, and a third parameter (e.g.,P_(nom)) that specifies a nominal value at which the process variable isto be directed to the extent that other constraints specified by thefirst parameter and the second parameter are not violated.

Example 191

The method of Example 190, wherein the set of control parameters furtherincludes a fourth parameter (e.g., U_(B0)) that specifies a constraintvalue that the process variable is not to exceed, if a pre-specifiedcondition is met.

Example 192

The method of Example 180, wherein the set of process variables includesa measurement of a load on the electrical system.

Example 193

The method of Example 180, wherein a control variable of the set ofcontrol variables is to control one or more of battery charging andbattery discharging.

Example 194

The method of Example 180, wherein a positive value of the controlvariable activates battering charging and a negative value of thecontrol variable activates discharging, and a zero value commands thebattery to remain idle.

Example 195

The method of Example 180, wherein a control variable of the set ofcontrol variables is to control battery power (e.g., charging anddischarging).

Example 196

The method of Example 180, wherein a control variable of the set ofcontrol variables is to curtail a power generation component of theelectrical system.

Example 197

The method of Example 196, wherein the power generation component is oneof a fuel powered generator, a wind power generator, and a photovoltaicpower generator.

The described features, operations, or characteristics may be arrangedand designed in a wide variety of different configurations and/orcombined in any suitable manner in one or more embodiments. Thus, thedetailed description of the embodiments of the systems and methods isnot intended to limit the scope of the disclosure, as claimed, but ismerely representative of possible embodiments of the disclosure. Inaddition, it will also be readily understood that the order of the stepsor actions of the methods described in connection with the embodimentsdisclosed may be changed as would be apparent to those skilled in theart. Thus, any order in the drawings or Detailed Description is forillustrative purposes only and is not meant to imply a required order,unless specified to require an order.

Embodiments may include various steps, which may be embodied inmachine-executable instructions to be executed by a general-purpose orspecial-purpose computer (or other electronic device). Alternatively,the steps may be performed by hardware components that include specificlogic for performing the steps, or by a combination of hardware,software, and/or firmware.

Embodiments may also be provided as a computer program product includinga computer-readable storage medium having stored instructions thereonthat may be used to program a computer (or other electronic device) toperform processes described herein. The computer-readable storage mediummay include, but is not limited to: hard drives, floppy diskettes,optical disks, CD-ROMs, DVD-ROMs, ROMs, RAMs, EPROMs, EEPROMs, magneticor optical cards, solid-state memory devices, or other types ofmedium/machine-readable medium suitable for storing electronicinstructions.

As used herein, a software module or component may include any type ofcomputer instruction or computer executable code located within a memorydevice and/or computer-readable storage medium. A software module may,for instance, comprise one or more physical or logical blocks ofcomputer instructions, which may be organized as a routine, program,object, component, data structure, etc., that performs one or more tasksor implements particular abstract data types.

In certain embodiments, a particular software module may comprisedisparate instructions stored in different locations of a memory device,which together implement the described functionality of the module.Indeed, a module may comprise a single instruction or many instructions,and may be distributed over several different code segments, amongdifferent programs, and across several memory devices. Some embodimentsmay be practiced in a distributed computing environment where tasks areperformed by a remote processing device linked through a communicationsnetwork. In a distributed computing environment, software modules may belocated in local and/or remote memory storage devices. In addition, databeing tied or rendered together in a database record may be resident inthe same memory device, or across several memory devices, and may belinked together in fields of a record in a database across a network.

The foregoing specification has been described with reference to variousembodiments, including the best mode. However, those skilled in the artappreciate that various modifications and changes can be made withoutdeparting from the scope of the present disclosure and the underlyingprinciples of the invention. Accordingly, this disclosure is to beregarded in an illustrative rather than a restrictive sense, and allsuch modifications are intended to be included within the scope thereof.Likewise, benefits, other advantages, and solutions to problems havebeen described above with regard to various embodiments. However,benefits, advantages, solutions to problems, and any element(s) that maycause any benefit, advantage, or solution to occur or become morepronounced are not to be construed as a critical, required, or essentialfeature or element.

As used herein, the terms “comprises,” “comprising,” or any othervariation thereof, are intended to cover a non-exclusive inclusion, suchthat a process, method, article, or apparatus that comprises a list ofelements does not include only those elements but may include otherelements not expressly listed or inherent to such process, method,article, or apparatus. Also, as used herein, the terms “coupled,”“coupling,” or any other variation thereof, are intended to cover aphysical connection, an electrical connection, a magnetic connection, anoptical connection, a communicative connection, a functional connection,and/or any other connection.

Principles of the present disclosure may be reflected in a computerprogram product on a tangible computer-readable storage medium havingcomputer-readable program code means embodied in the storage medium. Anysuitable computer-readable storage medium may be utilized, includingmagnetic storage devices (hard disks, floppy disks, and the like),optical storage devices (CD-ROMs, DVDs, Blu-Ray discs, and the like),flash memory, and/or the like. These computer program instructions maybe loaded onto a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions that execute on the computer or other programmabledata processing apparatus create means for implementing the functionsspecified. These computer program instructions may also be stored in acomputer-readable memory that can direct a computer or otherprogrammable data processing apparatus to function in a particularmanner, such that the instructions stored in the computer-readablememory produce an article of manufacture including instruction meanswhich implement the function specified. The computer programinstructions may also be loaded onto a computer or other programmabledata processing apparatus to cause a series of operational steps to beperformed on the computer or other programmable apparatus to produce acomputer-implemented process such that the instructions which execute onthe computer or other programmable apparatus provide steps forimplementing the functions specified.

Principles of the present disclosure may be reflected in a computerprogram implemented as one or more software modules or components. Asused herein, a software module or component (e.g., engine, system,subsystem) may include any type of computer instruction orcomputer-executable code located within a memory device and/orcomputer-readable storage medium. A software module may, for instance,comprise one or more physical or logical blocks of computerinstructions, which may be organized as a routine, a program, an object,a component, a data structure, etc., that perform one or more tasks orimplement particular data types.

In certain embodiments, a particular software module may comprisedisparate instructions stored in different locations of a memory device,which together implement the described functionality of the module.Indeed, a module may comprise a single instruction or many instructions,and may be distributed over several different code segments, amongdifferent programs, and across several memory devices. Some embodimentsmay be practiced in a distributed computing environment where tasks areperformed by a remote processing device linked through a communicationsnetwork. In a distributed computing environment, software modules may belocated in local and/or remote memory storage devices. In addition, databeing tied or rendered together in a database record may be resident inthe same memory device, or across several memory devices, and may belinked together in fields of a record in a database across a network.

Suitable software to assist in implementing the invention is readilyprovided by those of skill in the pertinent art(s) using the teachingspresented here and programming languages and tools, such as Java,Pascal, C++, C, database languages, APIs, SDKs, assembly, firmware,microcode, and/or other languages and tools.

Embodiments as disclosed herein may be computer-implemented in whole orin part on a digital computer. The digital computer includes a processorperforming the required computations. The computer further includes amemory in electronic communication with the processor to store acomputer operating system. The computer operating systems may include,but are not limited to, MS-DOS, Windows, Linux, Unix, AIX, CLIX, QNX,OS/2, and Apple. Alternatively, it is expected that future embodimentswill be adapted to execute on other future operating systems.

In some cases, well-known features, structures or operations are notshown or described in detail. Furthermore, the described features,structures, or operations may be combined in any suitable manner in oneor more embodiments. It will also be readily understood that thecomponents of the embodiments as generally described and illustrated inthe figures herein could be arranged and designed in a wide variety ofdifferent configurations.

Various operational steps, as well as components for carrying outoperational steps, may be implemented in alternate ways depending uponthe particular application or in consideration of any number of costfunctions associated with the operation of the system, e.g., one or moreof the steps may be deleted, modified, or combined with other steps.

While the principles of this disclosure have been shown in variousembodiments, many modifications of structure, arrangements, proportions,the elements, materials and components, used in practice, which areparticularly adapted for a specific environment and operatingrequirements, may be used without departing from the principles andscope of this disclosure. These and other changes or modifications areintended to be included within the scope of the present disclosure.

The scope of the present invention should, therefore, be determined onlyby the following claims.

The invention claimed is:
 1. A system to control operation of anelectrical system, the system comprising: an optimizer to generate acontrol plan for managing control of an electrical system during anupcoming time domain, the control plan including a plurality of sets ofparameters, each set of parameters of the plurality of sets ofparameters to be applied for a different time segment within theupcoming time domain, wherein the plurality of sets of parametersspecify objectives for the electrical system as a whole; and acontroller in communication with the optimizer to receive the controlplan, the controller to: determine a set of control values for a set ofcontrol variables for a given upcoming time segment of the upcoming timedomain, the set of control values determined based on a given set ofparameters of the plurality of sets of parameters of the control plan,wherein the given set of parameters corresponds to the given upcomingtime segment, wherein the set of control values are set to controloperation of one or more electrical components of the electrical powersystem to meet the objectives of the plurality of sets of parameters;and modify operation of one or more electrical components of theelectrical system based on the set of control values, the one or moreelectrical components including at least one of a load, a generator, anda storage device.
 2. The system of claim 1, wherein the controller islocal to the electrical system.
 3. The system of claim 1, wherein thecontroller receives a set of process variables providing one or moremeasurements of a state of the electrical system, and wherein thecontroller determines the set of control values based on the set ofprocess variables.
 4. The system of claim 3, wherein the processvariables include adjusted net power of the electrical system.
 5. Thesystem of claim 3, wherein the process variables include a battery stateof charge.
 6. The system of claim 1, wherein each set of parameters ofthe plurality of sets of parameters of the control plan comprises anupper bound parameter specifying an upper bound on adjusted demand ofthe electrical system.
 7. The system of claim 1, wherein the optimizeris remotely located from the controller, and the controller receives thecontrol plan over a communication network.
 8. The system of claim 1,wherein the optimizer generates the control plan by: preparing a costfunction to be evaluated based on the plurality of sets of parameters,the cost function including the one or more cost elements associatedwith operation of the electrical system; and executing a minimization ofthe cost function to determine optimal values for the plurality of setsof parameters.
 9. The system of claim 8, wherein the optimizer executesthe minimization of the cost function by utilizing an optimizationalgorithm to identify the optimal values in accordance with the one ormore cost elements.
 10. The system of claim 1, wherein the optimizer isfurther to receive a set of process variables that provide one or moremeasurements of a state of the electrical system, wherein the optimizerdetermines the control plan based on the set of process variables. 11.The system of claim 1, wherein the optimizer is further to receive a setof configuration elements specifying one or more constraints of theelectrical system and defining one or more cost elements associated withoperation of the electrical system, wherein optimizer determines thecontrol plan based on the set of configuration elements.
 12. The systemof claim 1, wherein the optimizer is further to predict one or more of aload on the electrical system and generation by a local generator of theelectrical system during the upcoming time domain, wherein the optimizergenerates the control plan considering the predicted one or more of thepredicted load and predicted generation during the upcoming time domain.13. A method of controlling operation of an electrical system, themethod comprising: generating by an optimizer a control plan thatincludes a plurality of sets of control parameters, each set of theplurality of sets to be applied for a different time segment within anupcoming time domain, wherein the plurality of sets of parametersspecify objectives for the electrical system as a whole; receiving thecontrol plan at a controller for managing control of the electricalsystem during the upcoming time domain, the controller in communicationwith the optimizer; determining on the controller a set of controlvalues for a set of control variables for a given time segment of theupcoming time domain, the set of control values determined based on agiven set of control parameters of the plurality of sets of controlparameters of the control plan, wherein the given set of controlparameters corresponds to the given time segment wherein the set ofcontrol values are set to control operation of one or more electricalcomponents of the electrical power system to meet the objectives of theplurality of sets of parameters; modifying, by the controller, operationof one or more electrical components of the electrical system during thegiven time segment based on the set of control values, the one or moreelectrical components including at least one of a load, a generator, anda storage device.
 14. The method of claim 13, wherein the controller islocal to the electrical system.
 15. The method of claim 13, furthercomprising receiving at the controller a set of process variables,including one or more measurements of a state of the electrical system,wherein the determining on the controller the set of control values isfurther based on the set of process variables.
 16. The method of claim15, wherein the process variables include adjusted net power of theelectrical system.
 17. The method of claim 15, wherein the processvariables include a battery state of charge.
 18. The method of claim 13,wherein each set of parameters of the plurality of sets of parameters ofthe control plan comprises an upper bound parameter specifying an upperbound on adjusted demand of the electrical system.
 19. The method ofclaim 13, wherein the optimizer is remotely located from the controller,and the controller receives the control plan over a communicationnetwork.
 20. The method of claim 13, wherein generating the control plancomprises: preparing a cost function to be evaluated based on theplurality of sets of control parameters, the cost function including oneor more cost elements associated with operation of the electricalsystem; and executing a minimization of the cost function to determineoptimal values for the plurality of sets of control parameters.
 21. Themethod of claim 20, wherein executing the minimization of the costfunction comprises utilization of an optimization algorithm to identifythe optimal values in accordance with the one or more cost elements. 22.The method of claim 13, further comprising receiving at the optimizer aset of process variables that include one or more measurements of astate of the electrical system, wherein the control plan is generatedbased on the set of process variables.
 23. The method of claim 13,further comprising receiving at the optimizer a set of configurationelements specifying one or more constraints of the electrical system anddefining one or more cost elements associated with operation of theelectrical system, wherein the generating the control plan is based onthe set of configuration elements.
 24. The method of claim 13, furthercomprising predicting on the optimizer one or more of a load on theelectrical system and generation by a local generator of the electricalsystem during the upcoming time domain, wherein the generating thecontrol plan includes consideration of one or more of the predicted loadand predicted generation during the upcoming time domain.
 25. Anelectrical system controller to optimize operation of an electricalsystem, the controller comprising: a first computing device to determinean optimal set of values for a control parameter set for managingcontrol of the electrical system during an upcoming time domain, thecontrol parameter set including a plurality of sets of parameters eachto be applied at a different time segment within the upcoming timedomain, wherein the plurality of sets of parameters specify objectivesfor the electrical system as a whole; a second computing device incommunication with the first computing device, the second computingdevice to determine a set of control values for a set of controlvariables for a given time segment of the upcoming time domain and toprovide the set of control values to the electrical system, wherein thesecond computing device determines the set of control values based on aset of values for a given set of parameters of the plurality of sets ofparameters of the control parameter set, wherein the given set ofparameters corresponds to an upcoming time segment, wherein the set ofcontrol values are set to control operation of one or more electricalcomponents of the electrical power system to meet the objectives of theplurality of sets of parameters.
 26. The electrical system controller ofclaim 25, wherein the first computing device determines the optimal setof values for the control parameter set based on one or more of a set ofconfiguration elements and a set of process variables, the set ofconfiguration elements specifying one or more constraints of theelectrical system and defining one or more cost elements associated withoperation of the electrical system, the set of process variablesproviding one or more measurements of a state of the electrical system.